From 160ea66268e7608fec8a56defecb8629538e0291 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 20:15:25 +0000 Subject: [PATCH 01/22] feat(api): api update --- .stats.yml | 4 ++-- lib/orb/models/new_allocation_price.rb | 12 +++++++++++- lib/orb/models/plan_create_params.rb | 10 +++++++++- lib/orb/models/plan_update_params.rb | 10 +++++++++- .../models/plans/external_plan_id_update_params.rb | 10 +++++++++- lib/orb/resources/plans.rb | 12 ++++++++---- lib/orb/resources/plans/external_plan_id.rb | 8 +++++--- lib/orb/resources/subscriptions.rb | 6 ++++++ rbi/orb/models/new_allocation_price.rbi | 12 ++++++++++++ rbi/orb/models/plan_create_params.rbi | 8 ++++++++ rbi/orb/models/plan_update_params.rbi | 8 ++++++++ .../models/plans/external_plan_id_update_params.rbi | 8 ++++++++ rbi/orb/resources/plans.rbi | 10 ++++++++-- rbi/orb/resources/plans/external_plan_id.rbi | 7 +++++-- rbi/orb/resources/subscriptions.rbi | 6 ++++++ sig/orb/models/new_allocation_price.rbs | 5 +++++ sig/orb/models/plan_create_params.rbs | 5 +++++ sig/orb/models/plan_update_params.rbs | 5 +++++ .../models/plans/external_plan_id_update_params.rbs | 5 +++++ sig/orb/resources/plans.rbs | 2 ++ sig/orb/resources/plans/external_plan_id.rbs | 1 + 21 files changed, 137 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9eac7077a..d32219bf2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-91a51960dab258d5435cc2a7f47760fd81e4b711b891a1fde3d98757e85e8add.yml -openapi_spec_hash: 192e4e94264db429260169f0b2e731ce +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6d5fe70daa99c4f8480b388e828d125c42f6ff501f5b8030832ec487c6c929f0.yml +openapi_spec_hash: 3ba772cb9926acc8b92881b311fd8685 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/new_allocation_price.rb b/lib/orb/models/new_allocation_price.rb index e881028f1..c3ec2dc42 100644 --- a/lib/orb/models/new_allocation_price.rb +++ b/lib/orb/models/new_allocation_price.rb @@ -55,6 +55,14 @@ class NewAllocationPrice < Orb::Internal::Type::BaseModel # @return [String, nil] optional :license_type_id, String, nil?: true + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + # @!attribute per_unit_cost_basis # The (per-unit) cost basis of each created block. If non-zero, a customer will be # invoiced according to the quantity and per unit cost basis specified for the @@ -63,7 +71,7 @@ class NewAllocationPrice < Orb::Internal::Type::BaseModel # @return [String, nil] optional :per_unit_cost_basis, String - # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil, filters: nil, item_id: nil, license_type_id: nil, per_unit_cost_basis: nil) + # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil, filters: nil, item_id: nil, license_type_id: nil, metadata: nil, per_unit_cost_basis: nil) # Some parameter documentations has been truncated, see # {Orb::Models::NewAllocationPrice} for more details. # @@ -83,6 +91,8 @@ class NewAllocationPrice < Orb::Internal::Type::BaseModel # # @param license_type_id [String, nil] The license type ID to associate the price with license allocation. # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # # @param per_unit_cost_basis [String] The (per-unit) cost basis of each created block. If non-zero, a customer will be # The cadence at which to allocate the amount to the customer. diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index a08ff78ae..109dbfa51 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -43,6 +43,12 @@ class PlanCreateParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :default_invoice_memo, String, nil?: true + # @!attribute description + # An optional user-defined description of the plan. + # + # @return [String, nil] + optional :description, String, nil?: true + # @!attribute external_plan_id # # @return [String, nil] @@ -78,7 +84,7 @@ class PlanCreateParams < Orb::Internal::Type::BaseModel # @return [Symbol, Orb::Models::PlanCreateParams::Status, nil] optional :status, enum: -> { Orb::PlanCreateParams::Status } - # @!method initialize(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) + # @!method initialize(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, description: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::PlanCreateParams} for more details. # @@ -92,6 +98,8 @@ class PlanCreateParams < Orb::Internal::Type::BaseModel # # @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal. # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/models/plan_update_params.rb b/lib/orb/models/plan_update_params.rb index 7a60ace7f..99ce08e7d 100644 --- a/lib/orb/models/plan_update_params.rb +++ b/lib/orb/models/plan_update_params.rb @@ -12,6 +12,12 @@ class PlanUpdateParams < Orb::Internal::Type::BaseModel # @return [String] required :plan_id, String + # @!attribute description + # An optional user-defined description of the plan. + # + # @return [String, nil] + optional :description, String, nil?: true + # @!attribute external_plan_id # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing @@ -28,12 +34,14 @@ class PlanUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(plan_id:, external_plan_id: nil, metadata: nil, request_options: {}) + # @!method initialize(plan_id:, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::PlanUpdateParams} for more details. # # @param plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/models/plans/external_plan_id_update_params.rb b/lib/orb/models/plans/external_plan_id_update_params.rb index 9a1aa5df8..8d95d18b3 100644 --- a/lib/orb/models/plans/external_plan_id_update_params.rb +++ b/lib/orb/models/plans/external_plan_id_update_params.rb @@ -13,6 +13,12 @@ class ExternalPlanIDUpdateParams < Orb::Internal::Type::BaseModel # @return [String] required :other_external_plan_id, String + # @!attribute description + # An optional user-defined description of the plan. + # + # @return [String, nil] + optional :description, String, nil?: true + # @!attribute external_plan_id # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing @@ -29,12 +35,14 @@ class ExternalPlanIDUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(other_external_plan_id:, external_plan_id: nil, metadata: nil, request_options: {}) + # @!method initialize(other_external_plan_id:, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Plans::ExternalPlanIDUpdateParams} for more details. # # @param other_external_plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/resources/plans.rb b/lib/orb/resources/plans.rb index bddb9617a..1f45d8795 100644 --- a/lib/orb/resources/plans.rb +++ b/lib/orb/resources/plans.rb @@ -26,7 +26,7 @@ class Plans # # This endpoint allows creation of plans including their prices. # - # @overload create(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) + # @overload create(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, description: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) # # @param currency [String] An ISO 4217 currency string for invoices generated by subscriptions on this plan # @@ -38,6 +38,8 @@ class Plans # # @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal. # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed @@ -61,15 +63,17 @@ def create(params) # Some parameter documentations has been truncated, see # {Orb::Models::PlanUpdateParams} for more details. # - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. # - # @overload update(plan_id, external_plan_id: nil, metadata: nil, request_options: {}) + # @overload update(plan_id, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # # @param plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/resources/plans/external_plan_id.rb b/lib/orb/resources/plans/external_plan_id.rb index 0f3a4b5f3..e8f2dc985 100644 --- a/lib/orb/resources/plans/external_plan_id.rb +++ b/lib/orb/resources/plans/external_plan_id.rb @@ -11,15 +11,17 @@ class ExternalPlanID # Some parameter documentations has been truncated, see # {Orb::Models::Plans::ExternalPlanIDUpdateParams} for more details. # - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. # - # @overload update(other_external_plan_id, external_plan_id: nil, metadata: nil, request_options: {}) + # @overload update(other_external_plan_id, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # # @param other_external_plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/resources/subscriptions.rb b/lib/orb/resources/subscriptions.rb index 2532f4fcc..326d2e1ec 100644 --- a/lib/orb/resources/subscriptions.rb +++ b/lib/orb/resources/subscriptions.rb @@ -1327,6 +1327,12 @@ def trigger_phase(subscription_id, params = {}) # cancellation. This operation will turn on auto-renew, ensuring that the # subscription does not end at the currently scheduled cancellation time. # + # Note: uncancellation is a lossy operation. Price intervals that were cut short + # by the cancellation are extended to infinity (original end dates are lost), and + # future intervals or phases scheduled after the cancellation time are permanently + # deleted. For complex subscriptions with phases or scheduled plan changes, + # consider creating a new plan change instead of uncancelling. + # # @overload unschedule_cancellation(subscription_id, request_options: {}) # # @param subscription_id [String] diff --git a/rbi/orb/models/new_allocation_price.rbi b/rbi/orb/models/new_allocation_price.rbi index 37225495a..f314acf36 100644 --- a/rbi/orb/models/new_allocation_price.rbi +++ b/rbi/orb/models/new_allocation_price.rbi @@ -47,6 +47,12 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :license_type_id + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + # The (per-unit) cost basis of each created block. If non-zero, a customer will be # invoiced according to the quantity and per unit cost basis specified for the # allocation each cadence. @@ -66,6 +72,7 @@ module Orb filters: T.nilable(T::Array[Orb::NewAllocationPrice::Filter::OrHash]), item_id: T.nilable(String), license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), per_unit_cost_basis: String ).returns(T.attached_class) end @@ -90,6 +97,10 @@ module Orb item_id: nil, # The license type ID to associate the price with license allocation. license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, # The (per-unit) cost basis of each created block. If non-zero, a customer will be # invoiced according to the quantity and per unit cost basis specified for the # allocation each cadence. @@ -108,6 +119,7 @@ module Orb filters: T.nilable(T::Array[Orb::NewAllocationPrice::Filter]), item_id: T.nilable(String), license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), per_unit_cost_basis: String } ) diff --git a/rbi/orb/models/plan_create_params.rbi b/rbi/orb/models/plan_create_params.rbi index 52adeeed8..4bdd47f7a 100644 --- a/rbi/orb/models/plan_create_params.rbi +++ b/rbi/orb/models/plan_create_params.rbi @@ -31,6 +31,10 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :default_invoice_memo + # An optional user-defined description of the plan. + sig { returns(T.nilable(String)) } + attr_accessor :description + sig { returns(T.nilable(String)) } attr_accessor :external_plan_id @@ -67,6 +71,7 @@ module Orb adjustments: T.nilable(T::Array[Orb::PlanCreateParams::Adjustment::OrHash]), default_invoice_memo: T.nilable(String), + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), net_terms: T.nilable(Integer), @@ -89,6 +94,8 @@ module Orb adjustments: nil, # Free-form text which is available on the invoice PDF and the Orb invoice portal. default_invoice_memo: nil, + # An optional user-defined description of the plan. + description: nil, external_plan_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared @@ -116,6 +123,7 @@ module Orb prices: T::Array[Orb::PlanCreateParams::Price], adjustments: T.nilable(T::Array[Orb::PlanCreateParams::Adjustment]), default_invoice_memo: T.nilable(String), + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), net_terms: T.nilable(Integer), diff --git a/rbi/orb/models/plan_update_params.rbi b/rbi/orb/models/plan_update_params.rbi index cb9b71e5b..341ef514f 100644 --- a/rbi/orb/models/plan_update_params.rbi +++ b/rbi/orb/models/plan_update_params.rbi @@ -12,6 +12,10 @@ module Orb sig { returns(String) } attr_accessor :plan_id + # An optional user-defined description of the plan. + sig { returns(T.nilable(String)) } + attr_accessor :description + # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -27,6 +31,7 @@ module Orb sig do params( plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -34,6 +39,8 @@ module Orb end def self.new( plan_id:, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -50,6 +57,7 @@ module Orb override.returns( { plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions diff --git a/rbi/orb/models/plans/external_plan_id_update_params.rbi b/rbi/orb/models/plans/external_plan_id_update_params.rbi index 5e661cb87..563d10a40 100644 --- a/rbi/orb/models/plans/external_plan_id_update_params.rbi +++ b/rbi/orb/models/plans/external_plan_id_update_params.rbi @@ -18,6 +18,10 @@ module Orb sig { returns(String) } attr_accessor :other_external_plan_id + # An optional user-defined description of the plan. + sig { returns(T.nilable(String)) } + attr_accessor :description + # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -33,6 +37,7 @@ module Orb sig do params( other_external_plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -40,6 +45,8 @@ module Orb end def self.new( other_external_plan_id:, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -56,6 +63,7 @@ module Orb override.returns( { other_external_plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions diff --git a/rbi/orb/resources/plans.rbi b/rbi/orb/resources/plans.rbi index ff6c8155a..16a92e69c 100644 --- a/rbi/orb/resources/plans.rbi +++ b/rbi/orb/resources/plans.rbi @@ -30,6 +30,7 @@ module Orb adjustments: T.nilable(T::Array[Orb::PlanCreateParams::Adjustment::OrHash]), default_invoice_memo: T.nilable(String), + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), net_terms: T.nilable(Integer), @@ -52,6 +53,8 @@ module Orb adjustments: nil, # Free-form text which is available on the invoice PDF and the Orb invoice portal. default_invoice_memo: nil, + # An optional user-defined description of the plan. + description: nil, external_plan_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared @@ -71,13 +74,14 @@ module Orb ) end - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. sig do params( plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -85,6 +89,8 @@ module Orb end def update( plan_id, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. diff --git a/rbi/orb/resources/plans/external_plan_id.rbi b/rbi/orb/resources/plans/external_plan_id.rbi index 98ba3f09e..56f45895d 100644 --- a/rbi/orb/resources/plans/external_plan_id.rbi +++ b/rbi/orb/resources/plans/external_plan_id.rbi @@ -8,13 +8,14 @@ module Orb # subscription. You can see more about how to configure prices in the # [Price resource](/reference/price). class ExternalPlanID - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. sig do params( other_external_plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -22,6 +23,8 @@ module Orb end def update( other_external_plan_id, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. diff --git a/rbi/orb/resources/subscriptions.rbi b/rbi/orb/resources/subscriptions.rbi index 79581a6a5..f461ad8b5 100644 --- a/rbi/orb/resources/subscriptions.rbi +++ b/rbi/orb/resources/subscriptions.rbi @@ -1415,6 +1415,12 @@ module Orb # To be eligible, the subscription must currently be active and have a future # cancellation. This operation will turn on auto-renew, ensuring that the # subscription does not end at the currently scheduled cancellation time. + # + # Note: uncancellation is a lossy operation. Price intervals that were cut short + # by the cancellation are extended to infinity (original end dates are lost), and + # future intervals or phases scheduled after the cancellation time are permanently + # deleted. For complex subscriptions with phases or scheduled plan changes, + # consider creating a new plan change instead of uncancelling. sig do params( subscription_id: String, diff --git a/sig/orb/models/new_allocation_price.rbs b/sig/orb/models/new_allocation_price.rbs index f3e692dda..1c265a5ac 100644 --- a/sig/orb/models/new_allocation_price.rbs +++ b/sig/orb/models/new_allocation_price.rbs @@ -10,6 +10,7 @@ module Orb filters: ::Array[Orb::NewAllocationPrice::Filter]?, item_id: String?, license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, per_unit_cost_basis: String } @@ -30,6 +31,8 @@ module Orb attr_accessor license_type_id: String? + attr_accessor metadata: ::Hash[Symbol, String?]? + attr_reader per_unit_cost_basis: String? def per_unit_cost_basis=: (String) -> String @@ -43,6 +46,7 @@ module Orb ?filters: ::Array[Orb::NewAllocationPrice::Filter]?, ?item_id: String?, ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, ?per_unit_cost_basis: String ) -> void @@ -55,6 +59,7 @@ module Orb filters: ::Array[Orb::NewAllocationPrice::Filter]?, item_id: String?, license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, per_unit_cost_basis: String } diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index c39d1f83a..4a8c265f5 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -7,6 +7,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, default_invoice_memo: String?, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, net_terms: Integer?, @@ -29,6 +30,8 @@ module Orb attr_accessor default_invoice_memo: String? + attr_accessor description: String? + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -49,6 +52,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], ?adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, ?default_invoice_memo: String?, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?net_terms: Integer?, @@ -63,6 +67,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, default_invoice_memo: String?, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, net_terms: Integer?, diff --git a/sig/orb/models/plan_update_params.rbs b/sig/orb/models/plan_update_params.rbs index 317305a91..30da81a6a 100644 --- a/sig/orb/models/plan_update_params.rbs +++ b/sig/orb/models/plan_update_params.rbs @@ -3,6 +3,7 @@ module Orb type plan_update_params = { plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } @@ -14,12 +15,15 @@ module Orb attr_accessor plan_id: String + attr_accessor description: String? + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( plan_id: String, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts @@ -27,6 +31,7 @@ module Orb def to_hash: -> { plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/plans/external_plan_id_update_params.rbs b/sig/orb/models/plans/external_plan_id_update_params.rbs index dda4557a2..f825ede85 100644 --- a/sig/orb/models/plans/external_plan_id_update_params.rbs +++ b/sig/orb/models/plans/external_plan_id_update_params.rbs @@ -4,6 +4,7 @@ module Orb type external_plan_id_update_params = { other_external_plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } @@ -15,12 +16,15 @@ module Orb attr_accessor other_external_plan_id: String + attr_accessor description: String? + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( other_external_plan_id: String, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts @@ -28,6 +32,7 @@ module Orb def to_hash: -> { other_external_plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/resources/plans.rbs b/sig/orb/resources/plans.rbs index fb3fcc193..82cf837f6 100644 --- a/sig/orb/resources/plans.rbs +++ b/sig/orb/resources/plans.rbs @@ -11,6 +11,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], ?adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, ?default_invoice_memo: String?, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?net_terms: Integer?, @@ -21,6 +22,7 @@ module Orb def update: ( String plan_id, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts diff --git a/sig/orb/resources/plans/external_plan_id.rbs b/sig/orb/resources/plans/external_plan_id.rbs index b0bd8d99e..4a116e263 100644 --- a/sig/orb/resources/plans/external_plan_id.rbs +++ b/sig/orb/resources/plans/external_plan_id.rbs @@ -4,6 +4,7 @@ module Orb class ExternalPlanID def update: ( String other_external_plan_id, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts From 70eb623e0694da153355a061b4bc059f3023f063 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 19:52:52 +0000 Subject: [PATCH 02/22] chore(tests): bump steady to v0.22.1 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 886f2ffc1..04d29019f 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.2 -- steady --version + npm exec --package=@stdy/cli@0.22.1 -- steady --version - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 9fc2510b1..ad94c14b9 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From bc1c5ceda19f8f2ee9a9459b9ac07f5cb1412b8b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 21:14:51 +0000 Subject: [PATCH 03/22] feat(api): api update --- .stats.yml | 4 ++-- .../ledger_create_entry_by_external_id_params.rb | 8 ++++---- .../customers/credits/ledger_create_entry_params.rb | 8 ++++---- .../ledger_create_entry_by_external_id_params.rbi | 12 ++++++------ .../customers/credits/ledger_create_entry_params.rbi | 12 ++++++------ 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index d32219bf2..14153b09a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6d5fe70daa99c4f8480b388e828d125c42f6ff501f5b8030832ec487c6c929f0.yml -openapi_spec_hash: 3ba772cb9926acc8b92881b311fd8685 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7e05611e4c9d413075ca46fb3753234c4881e2d32047be7454fcc9fc1d32f880.yml +openapi_spec_hash: 737e7b60280aae565966862cb42c8dcf config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb index d5bde5a2a..39330c7a6 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb @@ -388,9 +388,9 @@ class ExpirationChange < Orb::Internal::Type::BaseModel required :entry_type, const: :expiration_change # @!attribute target_expiry_date - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. # # @return [Date] required :target_expiry_date, Date @@ -443,7 +443,7 @@ class ExpirationChange < Orb::Internal::Type::BaseModel # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange} # for more details. # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot + # @param target_expiry_date [Date] A date (specified in YYYY-MM-DD format) used for expiration change, denoting whe # # @param amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre # diff --git a/lib/orb/models/customers/credits/ledger_create_entry_params.rb b/lib/orb/models/customers/credits/ledger_create_entry_params.rb index adc35aa77..46e2d4d69 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_params.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_params.rb @@ -388,9 +388,9 @@ class ExpirationChange < Orb::Internal::Type::BaseModel required :entry_type, const: :expiration_change # @!attribute target_expiry_date - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. # # @return [Date] required :target_expiry_date, Date @@ -443,7 +443,7 @@ class ExpirationChange < Orb::Internal::Type::BaseModel # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange} # for more details. # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot + # @param target_expiry_date [Date] A date (specified in YYYY-MM-DD format) used for expiration change, denoting whe # # @param amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre # diff --git a/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi b/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi index 4f3830ad8..6bad97293 100644 --- a/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +++ b/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi @@ -653,9 +653,9 @@ module Orb sig { returns(Symbol) } attr_accessor :entry_type - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. sig { returns(Date) } attr_accessor :target_expiry_date @@ -703,9 +703,9 @@ module Orb ).returns(T.attached_class) end def self.new( - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. target_expiry_date:, # The number of credits to effect. Note that this is required for increment, # decrement, void, or undo operations. diff --git a/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi b/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi index 993b66947..bb75be1e0 100644 --- a/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +++ b/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi @@ -653,9 +653,9 @@ module Orb sig { returns(Symbol) } attr_accessor :entry_type - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. sig { returns(Date) } attr_accessor :target_expiry_date @@ -703,9 +703,9 @@ module Orb ).returns(T.attached_class) end def self.new( - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. target_expiry_date:, # The number of credits to effect. Note that this is required for increment, # decrement, void, or undo operations. From 2430669ed45de80ddfc9f6bada96725a6de44463 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:54:14 +0000 Subject: [PATCH 04/22] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 348786428..a5e1b80af 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From abb683ad449e5f3c44d72e829ed8df261d5a8e62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:14:40 +0000 Subject: [PATCH 05/22] feat(api): api update --- .stats.yml | 4 ++-- lib/orb/resources/invoices.rb | 4 ++++ rbi/orb/resources/invoices.rbi | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 14153b09a..733d9209f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7e05611e4c9d413075ca46fb3753234c4881e2d32047be7454fcc9fc1d32f880.yml -openapi_spec_hash: 737e7b60280aae565966862cb42c8dcf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-eeffebaca8ce42919ea1e0b3b088c0adc197088c8cd6f46cd6339ed72a9e5058.yml +openapi_spec_hash: a9669b75ec8e699410f2dacd164168e4 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/resources/invoices.rb b/lib/orb/resources/invoices.rb index 164484fae..1c4386ed0 100644 --- a/lib/orb/resources/invoices.rb +++ b/lib/orb/resources/invoices.rb @@ -108,6 +108,10 @@ def update(invoice_id, params = {}) # values for each draft invoice, which may not always be up-to-date since Orb # regularly refreshes invoices asynchronously. # + # If you don't need line item details, minimums, maximums, or discounts, prefer + # the [list invoices summary](/api-reference/invoice/list-invoices-summary) + # endpoint for better performance. + # # @overload list(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {}) # # @param amount [String, nil] diff --git a/rbi/orb/resources/invoices.rbi b/rbi/orb/resources/invoices.rbi index 44cd21975..8d2a6183f 100644 --- a/rbi/orb/resources/invoices.rbi +++ b/rbi/orb/resources/invoices.rbi @@ -136,6 +136,10 @@ module Orb # When fetching any `draft` invoices, this returns the last-computed invoice # values for each draft invoice, which may not always be up-to-date since Orb # regularly refreshes invoices asynchronously. + # + # If you don't need line item details, minimums, maximums, or discounts, prefer + # the [list invoices summary](/api-reference/invoice/list-invoices-summary) + # endpoint for better performance. sig do params( amount: T.nilable(String), From bd3d31208c279ea4d20a796494d307cad588f984 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Apr 2026 01:14:51 +0000 Subject: [PATCH 06/22] feat(api): api update --- .stats.yml | 4 +- ...rnal_plan_id_create_plan_version_params.rb | 18678 +-------- .../models/beta_create_plan_version_params.rb | 18512 +-------- lib/orb/models/plan_create_params.rb | 8698 +---- ...nal_plan_id_create_plan_version_params.rbi | 31812 +--------------- .../beta_create_plan_version_params.rbi | 31768 +-------------- rbi/orb/models/plan_create_params.rbi | 14838 +------ ...nal_plan_id_create_plan_version_params.rbs | 12678 +----- .../beta_create_plan_version_params.rbs | 12628 +----- sig/orb/models/plan_create_params.rbs | 5974 +-- 10 files changed, 7258 insertions(+), 148332 deletions(-) diff --git a/.stats.yml b/.stats.yml index 733d9209f..b7d3a1ab0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-eeffebaca8ce42919ea1e0b3b088c0adc197088c8cd6f46cd6339ed72a9e5058.yml -openapi_spec_hash: a9669b75ec8e699410f2dacd164168e4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-07428f2af8d77b3af7d838375b0fb5adce7fba2c8312ca84bcd8ef340d782bbc.yml +openapi_spec_hash: 99d6e3e97bab8a25399a63f3db134542 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb index 3a7d10ef4..3a5836bb3 100644 --- a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +++ b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb @@ -158,11 +158,9 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute license_allocation_price # The license allocation price to add to the plan. # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] optional :license_allocation_price, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice - }, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice }, nil?: true # @!attribute plan_phase_order @@ -182,120 +180,349 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. # - # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. + # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. # # @param plan_phase_order [Integer, nil] The phase to add this price to. # # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. - # The license allocation price to add to the plan. - # # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#license_allocation_price - module LicenseAllocationPrice + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice} + # for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. + # + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end + + # The pricing model type + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum + + UNIT = :unit + + # @!method self.values + # @return [Array] + end + end + + # New plan price request body params. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#price + module Price extend Orb::Internal::Type::Union discriminator :model_type - variant :unit, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit } + variant :unit, -> { Orb::NewPlanUnitPrice } - variant :tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered } + variant :tiered, -> { Orb::NewPlanTieredPrice } - variant :bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk } + variant :bulk, -> { Orb::NewPlanBulkPrice } variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } - variant :package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package } + variant :package, -> { Orb::NewPlanPackagePrice } - variant :matrix, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix } + variant :matrix, -> { Orb::NewPlanMatrixPrice } - variant :threshold_total_amount, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount } + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - variant :tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage } + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - variant :tiered_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum } + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - variant :grouped_tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered } + variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - variant :tiered_package_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum } + variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - variant :package_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation } + variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - variant :unit_with_percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent } + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - variant :matrix_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation } + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - variant :unit_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - variant :grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } + variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - variant :bulk_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } + variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - variant :grouped_with_prorated_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } + variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - variant :grouped_with_metered_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } + variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - variant :grouped_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - variant :max_group_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - variant :cumulative_grouped_bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - variant :minimum_composite, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - variant :percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent } + variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent } variant :event_output, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput } + + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - class Unit < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -303,24 +530,11 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :unit] - required :model_type, const: :unit + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -328,12 +542,6 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -367,7 +575,7 @@ class Unit < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -435,21 +643,19 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) + # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. + # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -478,11 +684,85 @@ class Unit < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :unit] The pricing model type + # @param model_type [Symbol, :bulk_with_filters] The pricing model type + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # @!attribute filters + # Property filters to apply (all must match) + # + # @return [Array] + required :filters, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + end + + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + end + + # @!method initialize(filters:, tiers:) + # Configuration for bulk_with_filters pricing + # + # @param filters [Array] Property filters to apply (all must match) + # + # @param tiers [Array] Bulk tiers for rating based on total usage volume + + class Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on + # + # @return [String] + required :property_key, String + + # @!attribute property_value + # Event property value to match + # + # @return [String] + required :property_value, String + + # @!method initialize(property_key:, property_value:) + # Configuration for a single property filter + # + # @param property_key [String] Event property key to filter on + # + # @param property_value [String] Event property value to match + end + + class Tier < Orb::Internal::Type::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute tier_lower_bound + # The lower bound for this tier + # + # @return [String, nil] + optional :tier_lower_bound, String, nil?: true + + # @!method initialize(unit_amount:, tier_lower_bound: nil) + # Configuration for a single bulk pricing tier + # + # @param unit_amount [String] Amount per unit + # + # @param tier_lower_bound [String, nil] The lower bound for this tier + end + end # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -496,42 +776,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end end - class Tiered < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -539,24 +792,11 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -564,11 +804,12 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_config - # Configuration for tiered pricing + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -603,7 +844,7 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -671,20 +912,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing + # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -714,11 +953,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -733,47 +972,66 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String] - required :amount, String + # @return [Array] + required :tiers, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + end - # @!attribute currency - # The currency of the license allocation. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} + # for more details. # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # Configuration for tiered_with_proration pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier + # + # @param tier_lower_bound [String] Inclusive tier starting value + # + # @param unit_amount [String] Amount per unit + end end end - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -781,24 +1039,11 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk] - required :model_type, const: :bulk + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -839,7 +1084,7 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -907,19 +1152,17 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -950,11 +1193,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -969,17400 +1212,59 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + # @!attribute grouping_key + # The event property used to group before applying thresholds # # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end + required :grouping_key, String - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - end - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - end - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - end - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - end - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param minimum_composite_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :minimum_composite] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply - # - # @return [String] - required :minimum_amount, String - - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period - # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing - # - # @param minimum_amount [String] The minimum amount to apply - # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - # @!method self.variants - # @return [Array(Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput)] - end - - # New plan price request body params. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#price - module Price - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, -> { Orb::NewPlanUnitPrice } - - variant :tiered, -> { Orb::NewPlanTieredPrice } - - variant :bulk, -> { Orb::NewPlanBulkPrice } - - variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } - - variant :package, -> { Orb::NewPlanPackagePrice } - - variant :matrix, -> { Orb::NewPlanMatrixPrice } - - variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - - variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - - variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - - variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - - variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - - variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - - variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - - variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - - variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - - variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - - variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - - variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - - variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - - variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } - - variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - - variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - - variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - - variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - - variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } - - variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - - variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent } - - variant :event_output, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] - required :percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - end - - # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment_id - # The id of the adjustment to remove from on the plan. - # - # @return [String] - required :adjustment_id, String - - # @!attribute plan_phase_order - # The phase to remove this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment_id:, plan_phase_order: nil) - # @param adjustment_id [String] The id of the adjustment to remove from on the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from. - end - - class RemovePrice < Orb::Internal::Type::BaseModel - # @!attribute price_id - # The id of the price to remove from the plan. - # - # @return [String] - required :price_id, String - - # @!attribute plan_phase_order - # The phase to remove this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(price_id:, plan_phase_order: nil) - # @param price_id [String] The id of the price to remove from the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this price from. - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment - # The definition of a new adjustment to create and add to the plan. - # - # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] - required :adjustment, - union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment } - - # @!attribute replaces_adjustment_id - # The id of the adjustment on the plan to replace in the plan. - # - # @return [String] - required :replaces_adjustment_id, String - - # @!attribute plan_phase_order - # The phase to replace this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil) - # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan. - # - # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from. - - # The definition of a new adjustment to create and add to the plan. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment#adjustment - module Adjustment - extend Orb::Internal::Type::Union - - discriminator :adjustment_type - - variant :percentage_discount, -> { Orb::NewPercentageDiscount } - - variant :usage_discount, -> { Orb::NewUsageDiscount } - - variant :amount_discount, -> { Orb::NewAmountDiscount } - - variant :minimum, -> { Orb::NewMinimum } - - variant :maximum, -> { Orb::NewMaximum } - - # @!method self.variants - # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - # @!attribute replaces_price_id - # The id of the price on the plan to replace in the plan. - # - # @return [String] - required :replaces_price_id, String - - # @!attribute allocation_price - # The allocation price to add to the plan. - # - # @return [Orb::Models::NewAllocationPrice, nil] - optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true - - # @!attribute license_allocation_price - # The license allocation price to add to the plan. - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] - optional :license_allocation_price, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice - }, - nil?: true - - # @!attribute plan_phase_order - # The phase to replace this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!attribute price - # New plan price request body params. - # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] - optional :price, - union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price }, - nil?: true - - # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) - # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. - # - # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. - # - # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this price from. - # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. - - # The license allocation price to add to the plan. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit } - - variant :tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered } - - variant :bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk } - - variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters } - - variant :package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package } - - variant :matrix, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix } - - variant :threshold_total_amount, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount } - - variant :tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage } - - variant :tiered_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum } - - variant :grouped_tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered } - - variant :tiered_package_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum } - - variant :package_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation } - - variant :unit_with_percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent } - - variant :matrix_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation } - - variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration } - - variant :unit_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration } - - variant :grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation } - - variant :bulk_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration } - - variant :grouped_with_prorated_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum } - - variant :grouped_with_metered_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } - - variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName } - - variant :grouped_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage } - - variant :max_group_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } - - variant :cumulative_grouped_bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk } - - variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation } - - variant :minimum_composite, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite } - - variant :percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent } - - variant :event_output, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput } - - class Unit < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Tiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_config - # Configuration for tiered pricing - # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk} - # for more details. - # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - end - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - end - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - end - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @!attribute maximum_charge + # The maximum amount to charge each group # # @return [String] - required :amount, String + required :maximum_charge, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute minimum_charge + # The minimum amount to charge each group, regardless of usage # # @return [String] - required :currency, String + required :minimum_charge, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute per_unit_rate + # The base price charged per group # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :per_unit_rate, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) + # Configuration for grouped_with_min_max_thresholds pricing + # + # @param grouping_key [String] The event property used to group before applying thresholds + # + # @param maximum_charge [String] The maximum amount to charge each group # - # @param currency [String] The currency of the license allocation. + # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param per_unit_rate [String] The base price charged per group end end - class MinimumComposite < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -18370,31 +1272,11 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - end - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -18435,7 +1317,7 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -18503,18 +1385,16 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) + # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing # - # @param minimum_composite_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # @@ -18546,11 +1426,11 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :minimum_composite] The pricing model type + # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18565,53 +1445,42 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + # @!attribute cumulative_allocation + # The overall allocation across all groups # # @return [String] - required :amount, String + required :cumulative_allocation, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute group_allocation + # The allocation per individual group # # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + required :group_allocation, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. + # @!attribute grouping_key + # The event property used to group usage before applying allocations # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end + # @return [String] + required :grouping_key, String - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation # # @return [String] - required :minimum_amount, String + required :unit_amount, String - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period + # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) + # Configuration for cumulative_grouped_allocation pricing # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing + # @param cumulative_allocation [String] The overall allocation across all groups + # + # @param group_allocation [String] The allocation per individual group # - # @param minimum_amount [String] The minimum amount to apply + # @param grouping_key [String] The event property used to group usage before applying allocations # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period + # @param unit_amount [String] The amount to charge for each unit outside of the allocation end end @@ -18619,9 +1488,9 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18629,19 +1498,6 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # @@ -18657,9 +1513,9 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute percent_config # Configuration for percent pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig] + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] required :percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -18694,7 +1550,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig }, nil?: true @@ -18762,20 +1618,18 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) + # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing + # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -18809,7 +1663,7 @@ class Percent < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18824,34 +1678,7 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent#percent_config + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#percent_config class PercentConfig < Orb::Internal::Type::BaseModel # @!attribute percent # What percent of the component subtotals to charge @@ -18870,16 +1697,16 @@ class EventOutput < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence } # @!attribute event_output_config # Configuration for event_output pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] required :event_output_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -18887,19 +1714,6 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # @@ -18945,7 +1759,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig }, nil?: true @@ -19013,19 +1827,17 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) + # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. # - # @param event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing + # @param event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -19060,7 +1872,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19075,7 +1887,7 @@ module Cadence # @return [Array] end - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#event_output_config + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config class EventOutputConfig < Orb::Internal::Type::BaseModel # @!attribute unit_rating_key # The key in the event data to extract the unit rate from. @@ -19100,7 +1912,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} # for more details. # # Configuration for event_output pricing @@ -19111,37 +1923,395 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel # # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will end + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String + # @!method self.variants + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] + end + end - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + class RemoveAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment_id + # The id of the adjustment to remove from on the plan. + # + # @return [String] + required :adjustment_id, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @!attribute plan_phase_order + # The phase to remove this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end + # @!method initialize(adjustment_id:, plan_phase_order: nil) + # @param adjustment_id [String] The id of the adjustment to remove from on the plan. + # + # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from. + end + + class RemovePrice < Orb::Internal::Type::BaseModel + # @!attribute price_id + # The id of the price to remove from the plan. + # + # @return [String] + required :price_id, String + + # @!attribute plan_phase_order + # The phase to remove this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true + + # @!method initialize(price_id:, plan_phase_order: nil) + # @param price_id [String] The id of the price to remove from the plan. + # + # @param plan_phase_order [Integer, nil] The phase to remove this price from. + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment + # The definition of a new adjustment to create and add to the plan. + # + # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] + required :adjustment, + union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment } + + # @!attribute replaces_adjustment_id + # The id of the adjustment on the plan to replace in the plan. + # + # @return [String] + required :replaces_adjustment_id, String + + # @!attribute plan_phase_order + # The phase to replace this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true + + # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil) + # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan. + # + # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from. + + # The definition of a new adjustment to create and add to the plan. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment#adjustment + module Adjustment + extend Orb::Internal::Type::Union + + discriminator :adjustment_type + + variant :percentage_discount, -> { Orb::NewPercentageDiscount } + + variant :usage_discount, -> { Orb::NewUsageDiscount } + + variant :amount_discount, -> { Orb::NewAmountDiscount } + + variant :minimum, -> { Orb::NewMinimum } + + variant :maximum, -> { Orb::NewMaximum } # @!method self.variants - # @return [Array(Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput)] + # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + # @!attribute replaces_price_id + # The id of the price on the plan to replace in the plan. + # + # @return [String] + required :replaces_price_id, String + + # @!attribute allocation_price + # The allocation price to add to the plan. + # + # @return [Orb::Models::NewAllocationPrice, nil] + optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true + + # @!attribute license_allocation_price + # The license allocation price to add to the plan. + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] + optional :license_allocation_price, + -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + }, + nil?: true + + # @!attribute plan_phase_order + # The phase to replace this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true + + # @!attribute price + # New plan price request body params. + # + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + optional :price, + union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price }, + nil?: true + + # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) + # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. + # + # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. + # + # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this price from. + # + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice} + # for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. + # + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end + + # The pricing model type + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum + + UNIT = :unit + + # @!method self.values + # @return [Array] + end end # New plan price request body params. diff --git a/lib/orb/models/beta_create_plan_version_params.rb b/lib/orb/models/beta_create_plan_version_params.rb index 0e288ef26..46fedfeed 100644 --- a/lib/orb/models/beta_create_plan_version_params.rb +++ b/lib/orb/models/beta_create_plan_version_params.rb @@ -144,9 +144,9 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute license_allocation_price # The license allocation price to add to the plan. # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] optional :license_allocation_price, - union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice }, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice }, nil?: true # @!attribute plan_phase_order @@ -164,114 +164,343 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. # - # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. + # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. # # @param plan_phase_order [Integer, nil] The phase to add this price to. # # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. - # The license allocation price to add to the plan. - # # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#license_allocation_price - module LicenseAllocationPrice + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice} for + # more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. + # + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end + + # The pricing model type + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum + + UNIT = :unit + + # @!method self.values + # @return [Array] + end + end + + # New plan price request body params. + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#price + module Price extend Orb::Internal::Type::Union discriminator :model_type - variant :unit, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit } + variant :unit, -> { Orb::NewPlanUnitPrice } - variant :tiered, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered } + variant :tiered, -> { Orb::NewPlanTieredPrice } - variant :bulk, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk } + variant :bulk, -> { Orb::NewPlanBulkPrice } - variant :bulk_with_filters, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters } + variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } - variant :package, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package } + variant :package, -> { Orb::NewPlanPackagePrice } - variant :matrix, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix } + variant :matrix, -> { Orb::NewPlanMatrixPrice } - variant :threshold_total_amount, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount } + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - variant :tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage } + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - variant :tiered_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum } + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - variant :grouped_tiered, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered } + variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - variant :tiered_package_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum } + variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - variant :package_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation } + variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - variant :unit_with_percent, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent } + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - variant :matrix_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation } + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - variant :unit_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - variant :grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } + variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - variant :bulk_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } + variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - variant :grouped_with_prorated_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } + variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - variant :grouped_with_metered_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } + variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - variant :grouped_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - variant :max_group_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - variant :scalable_matrix_with_unit_pricing, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - variant :cumulative_grouped_bulk, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - variant :minimum_composite, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + + variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } - variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent } + variant :event_output, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput } - variant :event_output, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput } + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - class Unit < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -279,20 +508,11 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :unit] - required :model_type, const: :unit + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -300,12 +520,6 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -339,7 +553,7 @@ class Unit < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -407,21 +621,19 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) + # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit} - # for more details. + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} for + # more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. + # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing # - # @param item_id [String] The id of the item the price will be associated with. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -450,11 +662,77 @@ class Unit < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :unit] The pricing model type + # @param model_type [Symbol, :bulk_with_filters] The pricing model type + + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # @!attribute filters + # Property filters to apply (all must match) + # + # @return [Array] + required :filters, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] } + + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } + + # @!method initialize(filters:, tiers:) + # Configuration for bulk_with_filters pricing + # + # @param filters [Array] Property filters to apply (all must match) + # + # @param tiers [Array] Bulk tiers for rating based on total usage volume + + class Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on + # + # @return [String] + required :property_key, String + + # @!attribute property_value + # Event property value to match + # + # @return [String] + required :property_value, String + + # @!method initialize(property_key:, property_value:) + # Configuration for a single property filter + # + # @param property_key [String] Event property key to filter on + # + # @param property_value [String] Event property value to match + end + + class Tier < Orb::Internal::Type::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute tier_lower_bound + # The lower bound for this tier + # + # @return [String, nil] + optional :tier_lower_bound, String, nil?: true + + # @!method initialize(unit_amount:, tier_lower_bound: nil) + # Configuration for a single bulk pricing tier + # + # @param unit_amount [String] Amount per unit + # + # @param tier_lower_bound [String, nil] The lower bound for this tier + end + end # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -468,42 +746,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end end - class Tiered < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -511,20 +762,11 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -532,11 +774,12 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_config - # Configuration for tiered pricing + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -571,7 +814,7 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -639,20 +882,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing + # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -682,11 +923,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -701,47 +942,62 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String] - required :amount, String + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - # @!attribute currency - # The currency of the license allocation. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} + # for more details. # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # Configuration for tiered_with_proration pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier + # + # @param tier_lower_bound [String] Inclusive tier starting value + # + # @param unit_amount [String] Amount per unit + end end end - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -749,20 +1005,11 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk] - required :model_type, const: :bulk + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -803,7 +1050,7 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -871,19 +1118,17 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -914,11 +1159,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -933,17280 +1178,59 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + # @!attribute grouping_key + # The event property used to group before applying thresholds # # @return [String] - required :amount, String + required :grouping_key, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute maximum_charge + # The maximum amount to charge each group # # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation] } - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - end - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - end - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] } - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param minimum_composite_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :minimum_composite] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply - # - # @return [String] - required :minimum_amount, String - - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period - # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing - # - # @param minimum_amount [String] The minimum amount to apply - # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - # @!method self.variants - # @return [Array(Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput)] - end - - # New plan price request body params. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#price - module Price - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, -> { Orb::NewPlanUnitPrice } - - variant :tiered, -> { Orb::NewPlanTieredPrice } - - variant :bulk, -> { Orb::NewPlanBulkPrice } - - variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } - - variant :package, -> { Orb::NewPlanPackagePrice } - - variant :matrix, -> { Orb::NewPlanMatrixPrice } - - variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - - variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - - variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - - variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - - variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - - variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - - variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - - variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - - variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - - variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - - variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - - variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - - variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - - variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } - - variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - - variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - - variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - - variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - - variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } - - variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - - variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } - - variant :event_output, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} for - # more details. - # - # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] } - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] - required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] - required :percent_config, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent} for more - # details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] - required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput} for - # more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - end - - # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment_id - # The id of the adjustment to remove from on the plan. - # - # @return [String] - required :adjustment_id, String - - # @!attribute plan_phase_order - # The phase to remove this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment_id:, plan_phase_order: nil) - # @param adjustment_id [String] The id of the adjustment to remove from on the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from. - end - - class RemovePrice < Orb::Internal::Type::BaseModel - # @!attribute price_id - # The id of the price to remove from the plan. - # - # @return [String] - required :price_id, String - - # @!attribute plan_phase_order - # The phase to remove this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(price_id:, plan_phase_order: nil) - # @param price_id [String] The id of the price to remove from the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this price from. - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment - # The definition of a new adjustment to create and add to the plan. - # - # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] - required :adjustment, union: -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment } - - # @!attribute replaces_adjustment_id - # The id of the adjustment on the plan to replace in the plan. - # - # @return [String] - required :replaces_adjustment_id, String - - # @!attribute plan_phase_order - # The phase to replace this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil) - # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan. - # - # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from. - - # The definition of a new adjustment to create and add to the plan. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment#adjustment - module Adjustment - extend Orb::Internal::Type::Union - - discriminator :adjustment_type - - variant :percentage_discount, -> { Orb::NewPercentageDiscount } - - variant :usage_discount, -> { Orb::NewUsageDiscount } - - variant :amount_discount, -> { Orb::NewAmountDiscount } - - variant :minimum, -> { Orb::NewMinimum } - - variant :maximum, -> { Orb::NewMaximum } - - # @!method self.variants - # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - # @!attribute replaces_price_id - # The id of the price on the plan to replace in the plan. - # - # @return [String] - required :replaces_price_id, String - - # @!attribute allocation_price - # The allocation price to add to the plan. - # - # @return [Orb::Models::NewAllocationPrice, nil] - optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true - - # @!attribute license_allocation_price - # The license allocation price to add to the plan. - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] - optional :license_allocation_price, - union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice }, - nil?: true - - # @!attribute plan_phase_order - # The phase to replace this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!attribute price - # New plan price request body params. - # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] - optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true - - # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) - # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. - # - # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. - # - # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this price from. - # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. - - # The license allocation price to add to the plan. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#license_allocation_price - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit } - - variant :tiered, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered } - - variant :bulk, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk } - - variant :bulk_with_filters, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters } - - variant :package, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package } - - variant :matrix, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix } - - variant :threshold_total_amount, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount } - - variant :tiered_package, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage } - - variant :tiered_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum } - - variant :grouped_tiered, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered } - - variant :tiered_package_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum } - - variant :package_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation } - - variant :unit_with_percent, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent } - - variant :matrix_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation } - - variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration } - - variant :unit_with_proration, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration } - - variant :grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation } - - variant :bulk_with_proration, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration } - - variant :grouped_with_prorated_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum } - - variant :grouped_with_metered_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } - - variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName } - - variant :grouped_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage } - - variant :max_group_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } - - variant :cumulative_grouped_bulk, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk } - - variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation } - - variant :minimum_composite, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite } - - variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent } - - variant :event_output, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput } - - class Unit < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Tiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_config - # Configuration for tiered pricing - # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk} - # for more details. - # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation] } - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - end - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - end - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end + required :maximum_charge, String - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @!attribute minimum_charge + # The minimum amount to charge each group, regardless of usage # # @return [String] - required :amount, String + required :minimum_charge, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute per_unit_rate + # The base price charged per group # # @return [String] - required :currency, String + required :per_unit_rate, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) + # Configuration for grouped_with_min_max_thresholds pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @param grouping_key [String] The event property used to group before applying thresholds + # + # @param maximum_charge [String] The maximum amount to charge each group # - # @param currency [String] The currency of the license allocation. + # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param per_unit_rate [String] The base price charged per group end end - class MinimumComposite < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -18214,31 +1238,11 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - end - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -18279,7 +1283,7 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -18347,18 +1351,16 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) + # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing # - # @param minimum_composite_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # @@ -18390,11 +1392,11 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :minimum_composite] The pricing model type + # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18409,53 +1411,42 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + # @!attribute cumulative_allocation + # The overall allocation across all groups # # @return [String] - required :amount, String + required :cumulative_allocation, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute group_allocation + # The allocation per individual group # # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + required :group_allocation, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. + # @!attribute grouping_key + # The event property used to group usage before applying allocations # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end + # @return [String] + required :grouping_key, String - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation # # @return [String] - required :minimum_amount, String + required :unit_amount, String - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period + # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) + # Configuration for cumulative_grouped_allocation pricing # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing + # @param cumulative_allocation [String] The overall allocation across all groups # - # @param minimum_amount [String] The minimum amount to apply + # @param group_allocation [String] The allocation per individual group + # + # @param grouping_key [String] The event property used to group usage before applying allocations # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period + # @param unit_amount [String] The amount to charge for each unit outside of the allocation end end @@ -18463,9 +1454,8 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence } + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] + required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18473,15 +1463,6 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation] } - # @!attribute model_type # The pricing model type # @@ -18497,9 +1478,8 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute percent_config # Configuration for percent pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig } + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] + required :percent_config, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -18534,7 +1514,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig }, nil?: true @@ -18602,20 +1582,18 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) + # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent} - # for more details. + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent} for more + # details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing + # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -18649,7 +1627,7 @@ class Percent < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18664,34 +1642,7 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent#percent_config + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#percent_config class PercentConfig < Orb::Internal::Type::BaseModel # @!attribute percent # What percent of the component subtotals to charge @@ -18710,16 +1661,15 @@ class EventOutput < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence } + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] + required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence } # @!attribute event_output_config # Configuration for event_output pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] required :event_output_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -18727,15 +1677,6 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] } - # @!attribute model_type # The pricing model type # @@ -18781,7 +1722,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig }, nil?: true @@ -18849,19 +1790,17 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) + # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput} - # for more details. + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput} for + # more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. # - # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing + # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -18896,7 +1835,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18911,7 +1850,7 @@ module Cadence # @return [Array] end - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#event_output_config + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config class EventOutputConfig < Orb::Internal::Type::BaseModel # @!attribute unit_rating_key # The key in the event data to extract the unit rate from. @@ -18936,7 +1875,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} # for more details. # # Configuration for event_output pricing @@ -18947,37 +1886,386 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel # # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will end + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String + # @!method self.variants + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] + end + end - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + class RemoveAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment_id + # The id of the adjustment to remove from on the plan. + # + # @return [String] + required :adjustment_id, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @!attribute plan_phase_order + # The phase to remove this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end + # @!method initialize(adjustment_id:, plan_phase_order: nil) + # @param adjustment_id [String] The id of the adjustment to remove from on the plan. + # + # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from. + end + + class RemovePrice < Orb::Internal::Type::BaseModel + # @!attribute price_id + # The id of the price to remove from the plan. + # + # @return [String] + required :price_id, String + + # @!attribute plan_phase_order + # The phase to remove this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true + + # @!method initialize(price_id:, plan_phase_order: nil) + # @param price_id [String] The id of the price to remove from the plan. + # + # @param plan_phase_order [Integer, nil] The phase to remove this price from. + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment + # The definition of a new adjustment to create and add to the plan. + # + # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] + required :adjustment, union: -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment } + + # @!attribute replaces_adjustment_id + # The id of the adjustment on the plan to replace in the plan. + # + # @return [String] + required :replaces_adjustment_id, String + + # @!attribute plan_phase_order + # The phase to replace this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true + + # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil) + # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan. + # + # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from. + + # The definition of a new adjustment to create and add to the plan. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment#adjustment + module Adjustment + extend Orb::Internal::Type::Union + + discriminator :adjustment_type + + variant :percentage_discount, -> { Orb::NewPercentageDiscount } + + variant :usage_discount, -> { Orb::NewUsageDiscount } + + variant :amount_discount, -> { Orb::NewAmountDiscount } + + variant :minimum, -> { Orb::NewMinimum } + + variant :maximum, -> { Orb::NewMaximum } # @!method self.variants - # @return [Array(Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput)] + # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + # @!attribute replaces_price_id + # The id of the price on the plan to replace in the plan. + # + # @return [String] + required :replaces_price_id, String + + # @!attribute allocation_price + # The allocation price to add to the plan. + # + # @return [Orb::Models::NewAllocationPrice, nil] + optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true + + # @!attribute license_allocation_price + # The license allocation price to add to the plan. + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] + optional :license_allocation_price, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice }, + nil?: true + + # @!attribute plan_phase_order + # The phase to replace this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true + + # @!attribute price + # New plan price request body params. + # + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true + + # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) + # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. + # + # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. + # + # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this price from. + # + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#license_allocation_price + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice} + # for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. + # + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end + + # The pricing model type + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum + + UNIT = :unit + + # @!method self.values + # @return [Array] + end end # New plan price request body params. diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index 109dbfa51..1cf0c7055 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -122,9 +122,9 @@ class Price < Orb::Internal::Type::BaseModel # @!attribute license_allocation_price # The license allocation price to add to the plan. # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput, nil] + # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice, nil] optional :license_allocation_price, - union: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice }, + -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice }, nil?: true # @!attribute plan_phase_order @@ -142,8501 +142,249 @@ class Price < Orb::Internal::Type::BaseModel # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. # - # @param license_allocation_price [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. + # @param license_allocation_price [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice, nil] The license allocation price to add to the plan. # # @param plan_phase_order [Integer, nil] The phase to add this price to. # # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. - # The license allocation price to add to the plan. - # - # @see Orb::Models::PlanCreateParams::Price#license_allocation_price - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit } - - variant :tiered, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered } - - variant :bulk, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk } - - variant :bulk_with_filters, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters } - - variant :package, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package } - - variant :matrix, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix } - - variant :threshold_total_amount, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount } - - variant :tiered_package, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage } - - variant :tiered_with_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum } - - variant :grouped_tiered, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered } - - variant :tiered_package_with_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum } - - variant :package_with_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation } - - variant :unit_with_percent, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent } - - variant :matrix_with_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation } - - variant :tiered_with_proration, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration } - - variant :unit_with_proration, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration } - - variant :grouped_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation } - - variant :bulk_with_proration, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration } - - variant :grouped_with_prorated_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum } - - variant :grouped_with_metered_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum } - - variant :grouped_with_min_max_thresholds, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName } - - variant :grouped_tiered_package, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage } - - variant :max_group_tiered_package, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } - - variant :cumulative_grouped_bulk, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk } - - variant :cumulative_grouped_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite } - - variant :percent, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent } - - variant :event_output, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput } - - class Unit < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Tiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_config - # Configuration for tiered pricing - # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk} for more - # details. - # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] } - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] } - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation] } - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] } - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] } - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] } - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] } - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] } - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] } - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] } - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param minimum_composite_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :minimum_composite] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply - # - # @return [String] - required :minimum_amount, String - - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period - # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing - # - # @param minimum_amount [String] The minimum amount to apply - # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end + # @see Orb::Models::PlanCreateParams::Price#license_allocation_price + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ModelType] + required :model_type, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ConversionRateConfig }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice} for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] end - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output + required :amount, String - # @!attribute name - # The name of the price. + # @!attribute currency + # The currency of the license allocation. # # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true + required :currency, String - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput} for - # more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. + # @param currency [String] The currency of the license allocation. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + # The pricing model type + # + # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + UNIT = :unit - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end + # @!method self.values + # @return [Array] end - - # @!method self.variants - # @return [Array(Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput)] end # New plan price request body params. diff --git a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi index 91ef379c7..db6b316c6 100644 --- a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +++ b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi @@ -330,43 +330,21 @@ module Orb sig do returns( T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ) ) end - attr_accessor :license_allocation_price + attr_reader :license_allocation_price + + sig do + params( + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash + ) + ).void + end + attr_writer :license_allocation_price # The phase to add this price to. sig { returns(T.nilable(Integer)) } @@ -419,39 +397,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), license_allocation_price: T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::OrHash - ) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash ), plan_phase_order: T.nilable(Integer), price: @@ -510,39 +456,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice), license_allocation_price: T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ), plan_phase_order: T.nilable(Integer), price: @@ -587,466 +501,507 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def self.values - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput + ) + end - class Tiered < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. + # Configuration for bulk_with_filters pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence + attr_reader :bulk_with_filters_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # The cadence to bill for this price on. sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_accessor :license_allocations + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -1056,13 +1011,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1163,15 +1111,12 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], name: String, - tiered_config: Orb::TieredConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1199,18 +1144,14 @@ module Orb ).returns(T.attached_class) end def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for tiered pricing - tiered_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1249,23 +1190,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1295,133 +1233,228 @@ module Orb def to_hash end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end sig do override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] + { + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end - def self.values + def to_hash end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params( + property_key: String, + property_value: String + ).returns(T.attached_class) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } ) end + def to_hash + end + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { + unit_amount: String, + tier_lower_bound: T.nilable(String) + } + ) + end + def to_hash + end end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) sig do override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end end end - class Bulk < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1430,18 +1463,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1450,6 +1471,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1550,15 +1587,12 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1586,18 +1620,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1636,23 +1666,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1690,7 +1717,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1698,38 +1725,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -1737,107 +1764,135 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers + # Configuration for tiered_with_proration pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params( + tier_lower_bound: String, + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) end - attr_writer :bulk_with_filters_config + attr_reader :grouped_with_min_max_thresholds_config - # The cadence to bill for this price on. sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) + params( + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void end - attr_accessor :cadence + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1946,15 +2001,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1983,16 +2034,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -2033,22 +2080,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :grouped_with_min_max_thresholds ) end sig do override.returns( { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -2080,299 +2123,159 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) - end - attr_accessor :filters - # Bulk tiers for rating based on total usage volume sig do - returns( + override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end - attr_accessor :tiers + def self.values + end + end - # Configuration for bulk_with_filters pricing + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Internal::AnyHash + ) + end + + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end + end + end - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end + attr_accessor :cadence - # The cadence to bill for this price on. + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_accessor :cadence + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2381,13 +2284,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2489,14 +2385,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], name: String, - package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2526,16 +2419,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for package pricing - package_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2574,7 +2463,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :package + model_type: :cumulative_grouped_allocation ) end @@ -2582,15 +2471,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ], model_type: Symbol, name: String, - package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2628,7 +2514,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2636,38 +2522,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2675,50 +2561,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :amount + attr_accessor :cumulative_allocation - # The currency of the license allocation. + # The allocation per individual group sig { returns(String) } - attr_accessor :currency + attr_accessor :group_allocation - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key + + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount + # Configuration for cumulative_grouped_allocation pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end @@ -2727,11 +2622,11 @@ module Orb end end - class Matrix < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -2739,7 +2634,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence @@ -2748,25 +2643,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2775,6 +2651,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2876,14 +2768,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, name: String, + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2915,14 +2804,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2961,7 +2846,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :matrix + model_type: :percent ) end @@ -2969,15 +2854,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, model_type: Symbol, name: String, + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3015,7 +2897,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3023,38 +2905,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3062,63 +2944,38 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class EventOutput < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, Orb::Internal::AnyHash ) end @@ -3126,26 +2983,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for event_output pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig ) end - attr_accessor :license_allocations + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3155,22 +3016,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3272,15 +3117,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3310,16 +3151,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for event_output pricing + event_output_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3358,7 +3195,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :threshold_total_amount + model_type: :event_output ) end @@ -3366,16 +3203,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], model_type: Symbol, name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3413,7 +3246,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3421,38 +3254,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ] ) end @@ -3460,29075 +3293,882 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class EventOutputConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The key in the event data to extract the unit rate from. sig { returns(String) } - attr_accessor :amount + attr_accessor :unit_rating_key - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + # Configuration for event_output pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) } ) end def to_hash end end + end - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - sig { returns(String) } - attr_accessor :threshold + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - override.returns( - { threshold: String, total_amount: String } - ) - end - def to_hash - end - end - end + sig do + params( + price_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the price to remove from the plan. + price_id:, + # The phase to remove this price from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) end - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the plan. + adjustment:, + # The id of the adjustment on the plan to replace in the plan. + replaces_adjustment_id:, + # The phase to replace this adjustment from. + plan_phase_order: nil + ) + end - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + } + ) + end + def to_hash + end - # The name of the price. - sig { returns(String) } - attr_accessor :name + # The definition of a new adjustment to create and add to the plan. + module Adjustment + extend Orb::Internal::Type::Union - # Configuration for tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum ) end - attr_reader :tiered_package_config - sig do - params( - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # The id of the price on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_price_id - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The allocation price to add to the plan. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + # The license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ) + ) + end + attr_reader :license_allocation_price - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) + sig do + params( + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency + ).void + end + attr_writer :license_allocation_price - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration + # The phase to replace this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig do - override.returns({ percent: String, unit_amount: String }) - end - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params( - scaling_factor: String, - scaling_value: String - ).returns(T.attached_class) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end - end - - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput - ) - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end - - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id - - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id - - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end - - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id - - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price - - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price - - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ) - ) - end - attr_accessor :license_allocation_price - - # The phase to replace this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - # New plan price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price - - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - license_allocation_price: - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::OrHash - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice::OrHash, - Orb::NewPlanTieredPrice::OrHash, - Orb::NewPlanBulkPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewPlanPackagePrice::OrHash, - Orb::NewPlanMatrixPrice::OrHash, - Orb::NewPlanThresholdTotalAmountPrice::OrHash, - Orb::NewPlanTieredPackagePrice::OrHash, - Orb::NewPlanTieredWithMinimumPrice::OrHash, - Orb::NewPlanGroupedTieredPrice::OrHash, - Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, - Orb::NewPlanPackageWithAllocationPrice::OrHash, - Orb::NewPlanUnitWithPercentPrice::OrHash, - Orb::NewPlanMatrixWithAllocationPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewPlanUnitWithProrationPrice::OrHash, - Orb::NewPlanGroupedAllocationPrice::OrHash, - Orb::NewPlanBulkWithProrationPrice::OrHash, - Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, - Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, - Orb::NewPlanGroupedTieredPackagePrice::OrHash, - Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, - Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewPlanMinimumCompositePrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash - ) - ) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the plan. - replaces_price_id:, - # The allocation price to add to the plan. - allocation_price: nil, - # The license allocation price to add to the plan. - license_allocation_price: nil, - # The phase to replace this price from. - plan_phase_order: nil, - # New plan price request body params. - price: nil - ) - end - - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - license_allocation_price: - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - } - ) - end - def to_hash - end - - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - end - - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash - ], - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Tiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], - name: String, - tiered_config: Orb::TieredConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered pricing - tiered_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Bulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_config: Orb::BulkConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk pricing - bulk_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk - ) - end - - sig do - override.returns( - { - bulk_config: Orb::BulkConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns( - { threshold: String, total_amount: String } - ) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig do - override.returns({ percent: String, unit_amount: String }) - end - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params( - scaling_factor: String, - scaling_value: String - ).returns(T.attached_class) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: + # New plan price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end + ) + ) + end + attr_accessor :price - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash + ), + plan_phase_order: T.nilable(Integer), + price: + T.nilable( T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + Orb::NewPlanUnitPrice::OrHash, + Orb::NewPlanTieredPrice::OrHash, + Orb::NewPlanBulkPrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewPlanPackagePrice::OrHash, + Orb::NewPlanMatrixPrice::OrHash, + Orb::NewPlanThresholdTotalAmountPrice::OrHash, + Orb::NewPlanTieredPackagePrice::OrHash, + Orb::NewPlanTieredWithMinimumPrice::OrHash, + Orb::NewPlanGroupedTieredPrice::OrHash, + Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, + Orb::NewPlanPackageWithAllocationPrice::OrHash, + Orb::NewPlanUnitWithPercentPrice::OrHash, + Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewPlanUnitWithProrationPrice::OrHash, + Orb::NewPlanGroupedAllocationPrice::OrHash, + Orb::NewPlanBulkWithProrationPrice::OrHash, + Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, + Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, + Orb::NewPlanGroupedTieredPackagePrice::OrHash, + Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, + Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::NewPlanMinimumCompositePrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash + ) + ) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the plan. + replaces_price_id:, + # The allocation price to add to the plan. + allocation_price: nil, + # The license allocation price to add to the plan. + license_allocation_price: nil, + # The phase to replace this price from. + plan_phase_order: nil, + # New plan price request body params. + price: nil + ) + end - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ), + plan_phase_order: T.nilable(Integer), + price: T.nilable( T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) ) + } + ) + end + def to_hash + end + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - attr_accessor :conversion_rate_config - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # The name of the price. + sig { returns(String) } + attr_accessor :name - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) ) - end - def to_hash - end + ) + end + attr_accessor :conversion_rate_config - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil + ) + end - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate + sig do + override.returns( + { + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol ) - end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def to_hash - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end - end - end + OrSymbol = T.type_alias { T.any(Symbol, String) } - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end end end diff --git a/rbi/orb/models/beta_create_plan_version_params.rbi b/rbi/orb/models/beta_create_plan_version_params.rbi index afb0ad090..2ac29ca83 100644 --- a/rbi/orb/models/beta_create_plan_version_params.rbi +++ b/rbi/orb/models/beta_create_plan_version_params.rbi @@ -282,43 +282,21 @@ module Orb sig do returns( T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ) ) end - attr_accessor :license_allocation_price + attr_reader :license_allocation_price + + sig do + params( + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash + ) + ).void + end + attr_writer :license_allocation_price # The phase to add this price to. sig { returns(T.nilable(Integer)) } @@ -371,39 +349,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), license_allocation_price: T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::OrHash - ) + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash ), plan_phase_order: T.nilable(Integer), price: @@ -462,39 +408,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice), license_allocation_price: T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ), plan_phase_order: T.nilable(Integer), price: @@ -539,466 +453,507 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def self.values - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput + ) + end - class Tiered < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. + # Configuration for bulk_with_filters pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence + attr_reader :bulk_with_filters_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # The cadence to bill for this price on. sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_accessor :license_allocations + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -1008,13 +963,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1115,15 +1063,12 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], name: String, - tiered_config: Orb::TieredConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1151,18 +1096,14 @@ module Orb ).returns(T.attached_class) end def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for tiered pricing - tiered_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1201,23 +1142,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1247,133 +1185,224 @@ module Orb def to_hash end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end sig do override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] + { + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end - def self.values + def to_hash end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class ) end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) sig do override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end end end - class Bulk < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1382,18 +1411,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1402,6 +1419,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1502,15 +1535,12 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1538,18 +1568,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1588,23 +1614,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1642,7 +1665,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1650,38 +1673,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -1689,107 +1712,134 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for tiered_with_proration pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) end - attr_writer :bulk_with_filters_config + attr_reader :grouped_with_min_max_thresholds_config - # The cadence to bill for this price on. sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) + params( + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void end - attr_accessor :cadence + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1898,15 +1948,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1935,16 +1981,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1985,22 +2027,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :grouped_with_min_max_thresholds ) end sig do override.returns( { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -2032,295 +2070,159 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) - end - attr_accessor :filters - # Bulk tiers for rating based on total usage volume sig do - returns( + override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end - attr_accessor :tiers + def self.values + end + end - # Configuration for bulk_with_filters pricing + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Internal::AnyHash + ) + end + + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end + end + end - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end + attr_accessor :cadence - # The cadence to bill for this price on. + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_accessor :cadence + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2329,13 +2231,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2437,14 +2332,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], name: String, - package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2474,16 +2366,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for package pricing - package_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2522,7 +2410,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :package + model_type: :cumulative_grouped_allocation ) end @@ -2530,15 +2418,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ], model_type: Symbol, name: String, - package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2576,7 +2461,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2584,38 +2469,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2623,50 +2508,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :amount + attr_accessor :cumulative_allocation - # The currency of the license allocation. + # The allocation per individual group sig { returns(String) } - attr_accessor :currency + attr_accessor :group_allocation - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key + + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount + # Configuration for cumulative_grouped_allocation pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end @@ -2675,11 +2569,11 @@ module Orb end end - class Matrix < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -2687,7 +2581,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence @@ -2696,25 +2590,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2723,6 +2598,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2824,14 +2715,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2863,14 +2751,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2909,7 +2793,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :matrix + model_type: :percent ) end @@ -2917,15 +2801,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, model_type: Symbol, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2963,7 +2844,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2971,38 +2852,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3010,63 +2891,38 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class EventOutput < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, Orb::Internal::AnyHash ) end @@ -3074,26 +2930,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for event_output pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig ) end - attr_accessor :license_allocations + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3103,22 +2963,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3220,15 +3064,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3258,16 +3098,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for event_output pricing + event_output_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3306,7 +3142,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :threshold_total_amount + model_type: :event_output ) end @@ -3314,16 +3150,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], model_type: Symbol, name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3361,7 +3193,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3369,38 +3201,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ] ) end @@ -3408,29042 +3240,882 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class EventOutputConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The key in the event data to extract the unit rate from. sig { returns(String) } - attr_accessor :amount + attr_accessor :unit_rating_key - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + # Configuration for event_output pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) } ) end def to_hash end end + end - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig { returns(String) } - attr_accessor :threshold + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns({ threshold: String, total_amount: String }) - end - def to_hash - end - end - end + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) end - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type + sig do + params( + price_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the price to remove from the plan. + price_id:, + # The phase to remove this price from. + plan_phase_order: nil + ) + end - # The name of the price. - sig { returns(String) } - attr_accessor :name + sig do + override.returns( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - # Configuration for tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end - sig do - params( - tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the plan. + adjustment:, + # The id of the adjustment on the plan to replace in the plan. + replaces_adjustment_id:, + # The phase to replace this adjustment from. + plan_phase_order: nil + ) + end - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + } + ) + end + def to_hash + end - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + # The definition of a new adjustment to create and add to the plan. + module Adjustment + extend Orb::Internal::Type::Union - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum ) end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # The id of the price on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_price_id - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + # The allocation price to add to the plan. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end - end - - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput - ) - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end - - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id - - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id - - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end - - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id - - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price - - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price - - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ) - ) - end - attr_accessor :license_allocation_price - - # The phase to replace this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - # New plan price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price - - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - license_allocation_price: - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::OrHash - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice::OrHash, - Orb::NewPlanTieredPrice::OrHash, - Orb::NewPlanBulkPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewPlanPackagePrice::OrHash, - Orb::NewPlanMatrixPrice::OrHash, - Orb::NewPlanThresholdTotalAmountPrice::OrHash, - Orb::NewPlanTieredPackagePrice::OrHash, - Orb::NewPlanTieredWithMinimumPrice::OrHash, - Orb::NewPlanGroupedTieredPrice::OrHash, - Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, - Orb::NewPlanPackageWithAllocationPrice::OrHash, - Orb::NewPlanUnitWithPercentPrice::OrHash, - Orb::NewPlanMatrixWithAllocationPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewPlanUnitWithProrationPrice::OrHash, - Orb::NewPlanGroupedAllocationPrice::OrHash, - Orb::NewPlanBulkWithProrationPrice::OrHash, - Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, - Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, - Orb::NewPlanGroupedTieredPackagePrice::OrHash, - Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, - Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewPlanMinimumCompositePrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash - ) - ) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the plan. - replaces_price_id:, - # The allocation price to add to the plan. - allocation_price: nil, - # The license allocation price to add to the plan. - license_allocation_price: nil, - # The phase to replace this price from. - plan_phase_order: nil, - # New plan price request body params. - price: nil - ) - end - - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - license_allocation_price: - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - } - ) - end - def to_hash - end - - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - end - - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash - ], - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Tiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], - name: String, - tiered_config: Orb::TieredConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered pricing - tiered_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Bulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_config: Orb::BulkConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk pricing - bulk_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk - ) - end - - sig do - override.returns( - { - bulk_config: Orb::BulkConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns({ threshold: String, total_amount: String }) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ) + ) + end + attr_reader :license_allocation_price - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + sig do + params( + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end + ).void + end + attr_writer :license_allocation_price - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The phase to replace this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: + # New plan price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end + ) + ) + end + attr_accessor :price - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash + ), + plan_phase_order: T.nilable(Integer), + price: + T.nilable( T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + Orb::NewPlanUnitPrice::OrHash, + Orb::NewPlanTieredPrice::OrHash, + Orb::NewPlanBulkPrice::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewPlanPackagePrice::OrHash, + Orb::NewPlanMatrixPrice::OrHash, + Orb::NewPlanThresholdTotalAmountPrice::OrHash, + Orb::NewPlanTieredPackagePrice::OrHash, + Orb::NewPlanTieredWithMinimumPrice::OrHash, + Orb::NewPlanGroupedTieredPrice::OrHash, + Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, + Orb::NewPlanPackageWithAllocationPrice::OrHash, + Orb::NewPlanUnitWithPercentPrice::OrHash, + Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewPlanUnitWithProrationPrice::OrHash, + Orb::NewPlanGroupedAllocationPrice::OrHash, + Orb::NewPlanBulkWithProrationPrice::OrHash, + Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, + Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, + Orb::NewPlanGroupedTieredPackagePrice::OrHash, + Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, + Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::NewPlanMinimumCompositePrice::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash + ) + ) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the plan. + replaces_price_id:, + # The allocation price to add to the plan. + allocation_price: nil, + # The license allocation price to add to the plan. + license_allocation_price: nil, + # The phase to replace this price from. + plan_phase_order: nil, + # New plan price request body params. + price: nil + ) + end - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ), + plan_phase_order: T.nilable(Integer), + price: T.nilable( T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) ) + } + ) + end + def to_hash + end + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - attr_accessor :conversion_rate_config - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # The name of the price. + sig { returns(String) } + attr_accessor :name - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) ) - end - def to_hash - end + ) + end + attr_accessor :conversion_rate_config - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil + ) + end - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate + sig do + override.returns( + { + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol ) - end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def to_hash - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end - end - end + OrSymbol = T.type_alias { T.any(Symbol, String) } - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end end end diff --git a/rbi/orb/models/plan_create_params.rbi b/rbi/orb/models/plan_create_params.rbi index 4bdd47f7a..48a9380c3 100644 --- a/rbi/orb/models/plan_create_params.rbi +++ b/rbi/orb/models/plan_create_params.rbi @@ -156,44 +156,20 @@ module Orb # The license allocation price to add to the plan. sig do returns( - T.nilable( - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput - ) - ) + T.nilable(Orb::PlanCreateParams::Price::LicenseAllocationPrice) ) end - attr_accessor :license_allocation_price + attr_reader :license_allocation_price + + sig do + params( + license_allocation_price: + T.nilable( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::OrHash + ) + ).void + end + attr_writer :license_allocation_price # The phase to add this price to. sig { returns(T.nilable(Integer)) } @@ -246,39 +222,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), license_allocation_price: T.nilable( - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::OrHash - ) + Orb::PlanCreateParams::Price::LicenseAllocationPrice::OrHash ), plan_phase_order: T.nilable(Integer), price: @@ -336,41 +280,7 @@ module Orb { allocation_price: T.nilable(Orb::NewAllocationPrice), license_allocation_price: - T.nilable( - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput - ) - ), + T.nilable(Orb::PlanCreateParams::Price::LicenseAllocationPrice), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -414,14506 +324,428 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput + Orb::PlanCreateParams::Price::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end + def self.values end end - class Tiered < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. + # The amount of credits granted per active license per cadence. sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type + attr_accessor :amount - # The name of the price. + # The currency of the license allocation. sig { returns(String) } - attr_accessor :name - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + attr_accessor :currency - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. + # When True, overage beyond the allocation is written off. sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + attr_accessor :write_off_overage sig do params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, + # When True, overage beyond the allocation is written off. + write_off_overage: nil + ) end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - # The configuration for the rate of the price currency to the invoicing currency. sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } ) end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void + def to_hash end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + end - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + UNIT = + T.let( + :unit, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::TaggedSymbol + ) sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void + override.returns( + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], - name: String, - tiered_config: Orb::TieredConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered pricing - tiered_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Bulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_config: Orb::BulkConfig::OrHash, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk pricing - bulk_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk - ) - end - - sig do - override.returns( - { - bulk_config: Orb::BulkConfig, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns({ threshold: String, total_amount: String }) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end + def self.values end end - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end end # New plan price request body params. diff --git a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs index 54aba4612..3c336fd27 100644 --- a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +++ b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs @@ -101,7 +101,7 @@ module Orb type add_price = { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? } @@ -109,7 +109,7 @@ module Orb class AddPrice < Orb::Internal::Type::BaseModel attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price? + attr_accessor license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice? attr_accessor plan_phase_order: Integer? @@ -117,11692 +117,232 @@ module Orb def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, + ?license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, ?plan_phase_order: Integer?, ?price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? ) -> void def to_hash: -> { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? } type license_allocation_price = - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - type unit = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::UnitConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - name: String, - unit_config: Orb::UnitConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - name: String, - tiered_config: Orb::TieredConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk = - { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk - ) -> void - - def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { - property_key: String, - property_value: String - } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = - { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type minimum_composite_config = - { minimum_amount: String, prorated: bool } - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_reader prorated: bool? - - def prorated=: (bool) -> bool - - def initialize: ( - minimum_amount: String, - ?prorated: bool - ) -> void - - def to_hash: -> { minimum_amount: String, prorated: bool } - end - end - - type percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation] - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence - - attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price] - end - - type price = - Orb::NewPlanUnitPrice - | Orb::NewPlanTieredPrice - | Orb::NewPlanBulkPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters - | Orb::NewPlanPackagePrice - | Orb::NewPlanMatrixPrice - | Orb::NewPlanThresholdTotalAmountPrice - | Orb::NewPlanTieredPackagePrice - | Orb::NewPlanTieredWithMinimumPrice - | Orb::NewPlanGroupedTieredPrice - | Orb::NewPlanTieredPackageWithMinimumPrice - | Orb::NewPlanPackageWithAllocationPrice - | Orb::NewPlanUnitWithPercentPrice - | Orb::NewPlanMatrixWithAllocationPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration - | Orb::NewPlanUnitWithProrationPrice - | Orb::NewPlanGroupedAllocationPrice - | Orb::NewPlanBulkWithProrationPrice - | Orb::NewPlanGroupedWithProratedMinimumPrice - | Orb::NewPlanGroupedWithMeteredMinimumPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds - | Orb::NewPlanMatrixWithDisplayNamePrice - | Orb::NewPlanGroupedTieredPackagePrice - | Orb::NewPlanMaxGroupTieredPackagePrice - | Orb::NewPlanScalableMatrixWithUnitPricingPrice - | Orb::NewPlanScalableMatrixWithTieredPricingPrice - | Orb::NewPlanCumulativeGroupedBulkPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation - | Orb::NewPlanMinimumCompositePrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput - - module Price - extend Orb::Internal::Type::Union - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { - property_key: String, - property_value: String - } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - end - - type percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence] - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - - attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price] - end - end - - type remove_adjustment = - { adjustment_id: String, plan_phase_order: Integer? } - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } - end - - type remove_price = { price_id: String, plan_phase_order: Integer? } - - class RemovePrice < Orb::Internal::Type::BaseModel - attr_accessor price_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - price_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { price_id: String, plan_phase_order: Integer? } - end - - type replace_adjustment = - { - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment - - attr_accessor replaces_adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum - - module Adjustment - extend Orb::Internal::Type::Union - - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment] - end - end - - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - } - - class ReplacePrice < Orb::Internal::Type::BaseModel - attr_accessor replaces_price_id: String - - attr_accessor allocation_price: Orb::NewAllocationPrice? - - attr_accessor license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price? - - attr_accessor plan_phase_order: Integer? - - attr_accessor price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - ?plan_phase_order: Integer?, - ?price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - ) -> void - - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - } - - type license_allocation_price = - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - type unit = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::UnitConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - name: String, - unit_config: Orb::UnitConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - name: String, - tiered_config: Orb::TieredConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk = - { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk - ) -> void - - def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { - property_key: String, - property_value: String - } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = - { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void + attr_accessor invoice_grouping_key: String? - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + attr_accessor license_type_id: String? - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } + attr_accessor metadata: ::Hash[Symbol, String?]? - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String + attr_accessor reference_id: String? - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void - attr_accessor unit_price: String + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } - attr_accessor grouping_key: String? + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom - attr_accessor prorate: bool? + module Cadence + extend Orb::Internal::Type::Enum - attr_accessor second_dimension: String? + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence] + end - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String + attr_accessor currency: String - attr_accessor scaling_factor: String + attr_accessor write_off_overage: bool? - attr_accessor second_dimension_value: String? + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end + type model_type = :unit + + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type] end + end + + type price = + Orb::NewPlanUnitPrice + | Orb::NewPlanTieredPrice + | Orb::NewPlanBulkPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters + | Orb::NewPlanPackagePrice + | Orb::NewPlanMatrixPrice + | Orb::NewPlanThresholdTotalAmountPrice + | Orb::NewPlanTieredPackagePrice + | Orb::NewPlanTieredWithMinimumPrice + | Orb::NewPlanGroupedTieredPrice + | Orb::NewPlanTieredPackageWithMinimumPrice + | Orb::NewPlanPackageWithAllocationPrice + | Orb::NewPlanUnitWithPercentPrice + | Orb::NewPlanMatrixWithAllocationPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration + | Orb::NewPlanUnitWithProrationPrice + | Orb::NewPlanGroupedAllocationPrice + | Orb::NewPlanBulkWithProrationPrice + | Orb::NewPlanGroupedWithProratedMinimumPrice + | Orb::NewPlanGroupedWithMeteredMinimumPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds + | Orb::NewPlanMatrixWithDisplayNamePrice + | Orb::NewPlanGroupedTieredPackagePrice + | Orb::NewPlanMaxGroupTieredPackagePrice + | Orb::NewPlanScalableMatrixWithUnitPricingPrice + | Orb::NewPlanScalableMatrixWithTieredPricingPrice + | Orb::NewPlanCumulativeGroupedBulkPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::NewPlanMinimumCompositePrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput + + module Price + extend Orb::Internal::Type::Union - type scalable_matrix_with_tiered_pricing = + type bulk_with_filters = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, + model_type: :bulk_with_filters, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -11814,19 +354,17 @@ module Orb reference_id: String? } - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - attr_accessor item_id: String + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :scalable_matrix_with_tiered_pricing + attr_accessor model_type: :bulk_with_filters attr_accessor name: String - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -11835,7 +373,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -11856,16 +394,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -11875,21 +412,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, + model_type: :bulk_with_filters, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -11901,141 +437,98 @@ module Orb reference_id: String? } - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = + type bulk_with_filters_config = { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - attr_accessor second_dimension: String? + attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] ) -> void def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String + type filter = { property_key: String, property_value: String } - attr_accessor scaling_factor: String + class Filter < Orb::Internal::Type::BaseModel + attr_accessor property_key: String - attr_accessor second_dimension_value: String? + attr_accessor property_value: String def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? + property_key: String, + property_value: String ) -> void def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? + property_key: String, + property_value: String } end - type tier = { tier_lower_bound: String, unit_amount: String } + type tier = { unit_amount: String, tier_lower_bound: String? } class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - attr_accessor unit_amount: String + attr_accessor tier_lower_bound: String? + def initialize: ( - tier_lower_bound: String, - unit_amount: String + unit_amount: String, + ?tier_lower_bound: String? ) -> void def to_hash: -> { - tier_lower_bound: String, - unit_amount: String + unit_amount: String, + tier_lower_bound: String? } end end + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] + end end - type cumulative_grouped_bulk = + type tiered_with_proration = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12047,19 +540,17 @@ module Orb reference_id: String? } - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk + attr_accessor model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -12068,7 +559,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -12089,16 +580,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12108,21 +598,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12152,95 +641,57 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] end - type cumulative_grouped_bulk_config = + type tiered_with_proration_config = { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + type tier = { tier_lower_bound: String, unit_amount: String } + class Tier < Orb::Internal::Type::BaseModel attr_accessor tier_lower_bound: String attr_accessor unit_amount: String def initialize: ( - grouping_key: String, tier_lower_bound: String, unit_amount: String ) -> void def to_hash: -> { - grouping_key: String, tier_lower_bound: String, unit_amount: String } end end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end end - type cumulative_grouped_allocation = + type grouped_with_min_max_thresholds = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, + model_type: :grouped_with_min_max_thresholds, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12252,16 +703,14 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -12273,7 +722,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -12294,16 +743,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12313,21 +761,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, + model_type: :grouped_with_min_max_thresholds, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12355,80 +802,56 @@ module Orb MONTHLY: :monthly QUARTERLY: :quarterly ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String + CUSTOM: :custom - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] + end - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, + type grouped_with_min_max_thresholds_config = + { grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } - end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + attr_accessor grouping_key: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor maximum_charge: String - attr_accessor currency: String + attr_accessor minimum_charge: String - attr_accessor write_off_overage: bool? + attr_accessor per_unit_rate: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } end end - type minimum_composite = + type cumulative_grouped_allocation = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, + model_type: :cumulative_grouped_allocation, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12440,16 +863,14 @@ module Orb reference_id: String? } - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] + attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - attr_accessor minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig + attr_accessor item_id: String - attr_accessor model_type: :minimum_composite + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String @@ -12461,7 +882,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -12482,16 +903,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12501,21 +921,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :minimum_composite + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, + model_type: :cumulative_grouped_allocation, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12545,64 +964,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + type cumulative_grouped_allocation_config = + { + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - end - type minimum_composite_config = - { minimum_amount: String, prorated: bool } + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + attr_accessor cumulative_allocation: String - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + attr_accessor group_allocation: String - attr_reader prorated: bool? + attr_accessor grouping_key: String - def prorated=: (bool) -> bool + attr_accessor unit_amount: String def initialize: ( - minimum_amount: String, - ?prorated: bool + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void - def to_hash: -> { minimum_amount: String, prorated: bool } + def to_hash: -> { + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + } end end type percent = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], model_type: :percent, name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, + percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12615,17 +1024,15 @@ module Orb } class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation] - attr_accessor model_type: :percent attr_accessor name: String - attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig + attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -12635,7 +1042,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? attr_accessor currency: String? @@ -12656,16 +1063,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, + percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12679,17 +1085,16 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], model_type: :percent, name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, + percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12719,30 +1124,7 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence] end type percent_config = { percent: Float } @@ -12758,17 +1140,16 @@ module Orb type event_output = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], model_type: :event_output, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12781,14 +1162,12 @@ module Orb } class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig + attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] - attr_accessor model_type: :event_output attr_accessor name: String @@ -12801,7 +1180,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -12822,16 +1201,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12845,17 +1223,16 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], model_type: :event_output, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12885,7 +1262,7 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] end type event_output_config = @@ -12914,32 +1291,283 @@ module Orb grouping_key: String? } end + end + + def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price] + end + end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type remove_adjustment = + { adjustment_id: String, plan_phase_order: Integer? } - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String - attr_accessor currency: String + attr_accessor plan_phase_order: Integer? - attr_accessor write_off_overage: bool? + def initialize: ( + adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } + end - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + type remove_price = { price_id: String, plan_phase_order: Integer? } + + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor price_id: String + + attr_accessor plan_phase_order: Integer? + + def initialize: ( + price_id: String, + ?plan_phase_order: Integer? + ) -> void + + def to_hash: -> { price_id: String, plan_phase_order: Integer? } + end + + type replace_adjustment = + { + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment + + attr_accessor replaces_adjustment_id: String + + attr_accessor plan_phase_order: Integer? + + def initialize: ( + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void + + def to_hash: -> { + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } + + type adjustment = + Orb::NewPercentageDiscount + | Orb::NewUsageDiscount + | Orb::NewAmountDiscount + | Orb::NewMinimum + | Orb::NewMaximum + + module Adjustment + extend Orb::Internal::Type::Union + + def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment] + end + end + + type replace_price = + { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? + } + + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String + + attr_accessor allocation_price: Orb::NewAllocationPrice? + + attr_accessor license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice? + + attr_accessor plan_phase_order: Integer? + + attr_accessor price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? + + def initialize: ( + replaces_price_id: String, + ?allocation_price: Orb::NewAllocationPrice?, + ?license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + ?plan_phase_order: Integer?, + ?price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? + ) -> void + + def to_hash: -> { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? + } + + type license_allocation_price = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence] + end + + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } + + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor write_off_overage: bool? + + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void + + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } end - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price] + type model_type = :unit + + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type] + end end type price = diff --git a/sig/orb/models/beta_create_plan_version_params.rbs b/sig/orb/models/beta_create_plan_version_params.rbs index bc5e956ff..ebd774dfa 100644 --- a/sig/orb/models/beta_create_plan_version_params.rbs +++ b/sig/orb/models/beta_create_plan_version_params.rbs @@ -100,7 +100,7 @@ module Orb type add_price = { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? } @@ -108,7 +108,7 @@ module Orb class AddPrice < Orb::Internal::Type::BaseModel attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price? + attr_accessor license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice? attr_accessor plan_phase_order: Integer? @@ -116,11675 +116,227 @@ module Orb def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, + ?license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, ?plan_phase_order: Integer?, ?price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? ) -> void def to_hash: -> { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? } type license_allocation_price = - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - type unit = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::UnitConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - name: String, - unit_config: Orb::UnitConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - name: String, - tiered_config: Orb::TieredConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk = - { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk - ) -> void - - def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type minimum_composite_config = - { minimum_amount: String, prorated: bool } - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_reader prorated: bool? - - def prorated=: (bool) -> bool - - def initialize: (minimum_amount: String, ?prorated: bool) -> void - - def to_hash: -> { minimum_amount: String, prorated: bool } - end - end - - type percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation] - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence - - attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price] - end - - type price = - Orb::NewPlanUnitPrice - | Orb::NewPlanTieredPrice - | Orb::NewPlanBulkPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters - | Orb::NewPlanPackagePrice - | Orb::NewPlanMatrixPrice - | Orb::NewPlanThresholdTotalAmountPrice - | Orb::NewPlanTieredPackagePrice - | Orb::NewPlanTieredWithMinimumPrice - | Orb::NewPlanGroupedTieredPrice - | Orb::NewPlanTieredPackageWithMinimumPrice - | Orb::NewPlanPackageWithAllocationPrice - | Orb::NewPlanUnitWithPercentPrice - | Orb::NewPlanMatrixWithAllocationPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration - | Orb::NewPlanUnitWithProrationPrice - | Orb::NewPlanGroupedAllocationPrice - | Orb::NewPlanBulkWithProrationPrice - | Orb::NewPlanGroupedWithProratedMinimumPrice - | Orb::NewPlanGroupedWithMeteredMinimumPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds - | Orb::NewPlanMatrixWithDisplayNamePrice - | Orb::NewPlanGroupedTieredPackagePrice - | Orb::NewPlanMaxGroupTieredPackagePrice - | Orb::NewPlanScalableMatrixWithUnitPricingPrice - | Orb::NewPlanScalableMatrixWithTieredPricingPrice - | Orb::NewPlanCumulativeGroupedBulkPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation - | Orb::NewPlanMinimumCompositePrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput - - module Price - extend Orb::Internal::Type::Union - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - end - - type percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence] - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - - attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::price] - end - end - - type remove_adjustment = - { adjustment_id: String, plan_phase_order: Integer? } - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } - end - - type remove_price = { price_id: String, plan_phase_order: Integer? } - - class RemovePrice < Orb::Internal::Type::BaseModel - attr_accessor price_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: (price_id: String, ?plan_phase_order: Integer?) -> void - - def to_hash: -> { price_id: String, plan_phase_order: Integer? } - end - - type replace_adjustment = - { - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment - - attr_accessor replaces_adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum - - module Adjustment - extend Orb::Internal::Type::Union - - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment] - end - end - - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - } - - class ReplacePrice < Orb::Internal::Type::BaseModel - attr_accessor replaces_price_id: String - - attr_accessor allocation_price: Orb::NewAllocationPrice? - - attr_accessor license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price? - - attr_accessor plan_phase_order: Integer? - - attr_accessor price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - ?plan_phase_order: Integer?, - ?price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - ) -> void - - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - } - - type license_allocation_price = - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - type unit = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::UnitConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - name: String, - unit_config: Orb::UnitConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - name: String, - tiered_config: Orb::TieredConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk = - { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk - ) -> void - - def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end + { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + attr_accessor conversion_rate: Float? - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config? - attr_accessor currency: String + attr_accessor currency: String? - attr_accessor write_off_overage: bool? + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + attr_accessor external_price_id: String? - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + attr_accessor fixed_price_quantity: Float? - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } + attr_accessor invoice_grouping_key: String? - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - attr_accessor package_size: String + attr_accessor license_type_id: String? - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + attr_accessor metadata: ::Hash[Symbol, String?]? - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void + attr_accessor reference_id: String? - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void - type tier = { tier_lower_bound: String, unit_amount: String } + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - attr_accessor unit_amount: String + module Cadence + extend Orb::Internal::Type::Enum - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence] end - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor license_type_id: String? + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - attr_accessor metadata: ::Hash[Symbol, String?]? + attr_accessor currency: String - attr_accessor reference_id: String? + attr_accessor write_off_overage: bool? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end - attr_accessor scaling_factor: String + type model_type = :unit - attr_accessor second_dimension_value: String? + module ModelType + extend Orb::Internal::Type::Enum - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void + UNIT: :unit - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type] end + end + + type price = + Orb::NewPlanUnitPrice + | Orb::NewPlanTieredPrice + | Orb::NewPlanBulkPrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters + | Orb::NewPlanPackagePrice + | Orb::NewPlanMatrixPrice + | Orb::NewPlanThresholdTotalAmountPrice + | Orb::NewPlanTieredPackagePrice + | Orb::NewPlanTieredWithMinimumPrice + | Orb::NewPlanGroupedTieredPrice + | Orb::NewPlanTieredPackageWithMinimumPrice + | Orb::NewPlanPackageWithAllocationPrice + | Orb::NewPlanUnitWithPercentPrice + | Orb::NewPlanMatrixWithAllocationPrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration + | Orb::NewPlanUnitWithProrationPrice + | Orb::NewPlanGroupedAllocationPrice + | Orb::NewPlanBulkWithProrationPrice + | Orb::NewPlanGroupedWithProratedMinimumPrice + | Orb::NewPlanGroupedWithMeteredMinimumPrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds + | Orb::NewPlanMatrixWithDisplayNamePrice + | Orb::NewPlanGroupedTieredPackagePrice + | Orb::NewPlanMaxGroupTieredPackagePrice + | Orb::NewPlanScalableMatrixWithUnitPricingPrice + | Orb::NewPlanScalableMatrixWithTieredPricingPrice + | Orb::NewPlanCumulativeGroupedBulkPrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::NewPlanMinimumCompositePrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput + + module Price + extend Orb::Internal::Type::Union - type scalable_matrix_with_tiered_pricing = + type bulk_with_filters = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, + model_type: :bulk_with_filters, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -11796,19 +348,17 @@ module Orb reference_id: String? } - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig + + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing + attr_accessor model_type: :bulk_with_filters attr_accessor name: String - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -11817,7 +367,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -11838,16 +388,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -11857,21 +406,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, + model_type: :bulk_with_filters, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -11883,141 +431,95 @@ module Orb reference_id: String? } - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = + type bulk_with_filters_config = { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? + filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - attr_accessor second_dimension: String? + attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? + filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] ) -> void def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? + filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String + type filter = { property_key: String, property_value: String } - attr_accessor scaling_factor: String + class Filter < Orb::Internal::Type::BaseModel + attr_accessor property_key: String - attr_accessor second_dimension_value: String? + attr_accessor property_value: String def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? + property_key: String, + property_value: String ) -> void - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } + def to_hash: -> { property_key: String, property_value: String } end - type tier = { tier_lower_bound: String, unit_amount: String } + type tier = { unit_amount: String, tier_lower_bound: String? } class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - attr_accessor unit_amount: String + attr_accessor tier_lower_bound: String? + def initialize: ( - tier_lower_bound: String, - unit_amount: String + unit_amount: String, + ?tier_lower_bound: String? ) -> void def to_hash: -> { - tier_lower_bound: String, - unit_amount: String + unit_amount: String, + tier_lower_bound: String? } end end + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] + end end - type cumulative_grouped_bulk = + type tiered_with_proration = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12029,19 +531,17 @@ module Orb reference_id: String? } - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk + attr_accessor model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -12050,7 +550,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -12071,16 +571,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], name: String, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12090,21 +589,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12134,95 +632,57 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] end - type cumulative_grouped_bulk_config = + type tiered_with_proration_config = { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + type tier = { tier_lower_bound: String, unit_amount: String } + class Tier < Orb::Internal::Type::BaseModel attr_accessor tier_lower_bound: String attr_accessor unit_amount: String def initialize: ( - grouping_key: String, tier_lower_bound: String, unit_amount: String ) -> void def to_hash: -> { - grouping_key: String, tier_lower_bound: String, unit_amount: String } end end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end end - type cumulative_grouped_allocation = + type grouped_with_min_max_thresholds = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, + model_type: :grouped_with_min_max_thresholds, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12234,16 +694,14 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -12255,7 +713,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -12276,16 +734,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12295,21 +752,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, + model_type: :grouped_with_min_max_thresholds, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12335,82 +791,58 @@ module Orb ANNUAL: :annual SEMI_ANNUAL: :semi_annual MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] + end + + type grouped_with_min_max_thresholds_config = + { grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } - end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + attr_accessor grouping_key: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor maximum_charge: String - attr_accessor currency: String + attr_accessor minimum_charge: String - attr_accessor write_off_overage: bool? + attr_accessor per_unit_rate: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } end end - type minimum_composite = + type cumulative_grouped_allocation = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, + model_type: :cumulative_grouped_allocation, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12422,16 +854,14 @@ module Orb reference_id: String? } - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] + attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - attr_accessor minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig + attr_accessor item_id: String - attr_accessor model_type: :minimum_composite + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String @@ -12443,7 +873,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -12464,16 +894,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12483,21 +912,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :minimum_composite + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, + model_type: :cumulative_grouped_allocation, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12527,61 +955,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type cumulative_grouped_allocation_config = + { + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + } + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + attr_accessor cumulative_allocation: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor group_allocation: String - attr_accessor currency: String + attr_accessor grouping_key: String - attr_accessor write_off_overage: bool? + attr_accessor unit_amount: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } end - - type minimum_composite_config = - { minimum_amount: String, prorated: bool } - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_reader prorated: bool? - - def prorated=: (bool) -> bool - - def initialize: (minimum_amount: String, ?prorated: bool) -> void - - def to_hash: -> { minimum_amount: String, prorated: bool } - end end type percent = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], model_type: :percent, name: String, - percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, + percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12594,17 +1015,15 @@ module Orb } class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation] - attr_accessor model_type: :percent attr_accessor name: String - attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig + attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -12614,7 +1033,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? attr_accessor currency: String? @@ -12635,16 +1054,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], name: String, - percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, + percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12658,17 +1076,16 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], model_type: :percent, name: String, - percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, + percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12698,30 +1115,7 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence] end type percent_config = { percent: Float } @@ -12737,17 +1131,16 @@ module Orb type event_output = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], model_type: :event_output, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12760,14 +1153,12 @@ module Orb } class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig + attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] - attr_accessor model_type: :event_output attr_accessor name: String @@ -12780,7 +1171,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -12801,16 +1192,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12824,17 +1214,16 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], model_type: :event_output, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12864,7 +1253,7 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] end type event_output_config = @@ -12893,32 +1282,275 @@ module Orb grouping_key: String? } end + end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::price] + end + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + type remove_adjustment = + { adjustment_id: String, plan_phase_order: Integer? } - attr_accessor currency: String + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String - attr_accessor write_off_overage: bool? + attr_accessor plan_phase_order: Integer? - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + def initialize: ( + adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } + end + + type remove_price = { price_id: String, plan_phase_order: Integer? } + + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor price_id: String + + attr_accessor plan_phase_order: Integer? + + def initialize: (price_id: String, ?plan_phase_order: Integer?) -> void + + def to_hash: -> { price_id: String, plan_phase_order: Integer? } + end + + type replace_adjustment = + { + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment + + attr_accessor replaces_adjustment_id: String + + attr_accessor plan_phase_order: Integer? + + def initialize: ( + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void + + def to_hash: -> { + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } + + type adjustment = + Orb::NewPercentageDiscount + | Orb::NewUsageDiscount + | Orb::NewAmountDiscount + | Orb::NewMinimum + | Orb::NewMaximum + + module Adjustment + extend Orb::Internal::Type::Union + + def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment] + end + end + + type replace_price = + { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + } + + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String + + attr_accessor allocation_price: Orb::NewAllocationPrice? + + attr_accessor license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice? + + attr_accessor plan_phase_order: Integer? + + attr_accessor price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + + def initialize: ( + replaces_price_id: String, + ?allocation_price: Orb::NewAllocationPrice?, + ?license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + ?plan_phase_order: Integer?, + ?price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + ) -> void + + def to_hash: -> { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + } + + type license_allocation_price = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence] + end + + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } + + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor write_off_overage: bool? + + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void + + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } end - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price] + type model_type = :unit + + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type] + end end type price = diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index 4a8c265f5..c131fe2e9 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -79,7 +79,7 @@ module Orb type price = { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, + license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::PlanCreateParams::Price::price? } @@ -87,7 +87,7 @@ module Orb class Price < Orb::Internal::Type::BaseModel attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price? + attr_accessor license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice? attr_accessor plan_phase_order: Integer? @@ -95,5861 +95,177 @@ module Orb def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, + ?license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice?, ?plan_phase_order: Integer?, ?price: Orb::Models::PlanCreateParams::Price::price? ) -> void def to_hash: -> { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, + license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::PlanCreateParams::Price::price? } type license_allocation_price = - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - type unit = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::UnitConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation], - name: String, - unit_config: Orb::UnitConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], - name: String, - tiered_config: Orb::TieredConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk = - { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk - ) -> void - - def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type minimum_composite_config = - { minimum_amount: String, prorated: bool } - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_reader prorated: bool? - - def prorated=: (bool) -> bool - - def initialize: (minimum_amount: String, ?prorated: bool) -> void - - def to_hash: -> { minimum_amount: String, prorated: bool } - end - end - - type percent = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } + { + cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation] - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence] end - type event_output = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence - - attr_accessor event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation] - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor license_type_id: String? + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - attr_accessor metadata: ::Hash[Symbol, String?]? + attr_accessor currency: String - attr_accessor reference_id: String? + attr_accessor write_off_overage: bool? def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? + amount: String, + currency: String, + write_off_overage: bool? } + end - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String + type model_type = :unit - attr_accessor write_off_overage: bool? + module ModelType + extend Orb::Internal::Type::Enum - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + UNIT: :unit - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type] end - - def self?.variants: -> ::Array[Orb::Models::PlanCreateParams::Price::license_allocation_price] end type price = From 98a1cef742a7169b8b481020369e2dcd1f4c3493 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:29:24 +0000 Subject: [PATCH 07/22] feat: support setting headers via env --- lib/orb/client.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/orb/client.rb b/lib/orb/client.rb index 24bd8b728..7d061b4eb 100644 --- a/lib/orb/client.rb +++ b/lib/orb/client.rb @@ -193,6 +193,19 @@ def initialize( raise ArgumentError.new("api_key is required, and can be set via environ: \"ORB_API_KEY\"") end + headers = {} + custom_headers_env = ENV["ORB_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end + @api_key = api_key.to_s @webhook_secret = webhook_secret&.to_s @@ -202,6 +215,7 @@ def initialize( max_retries: max_retries, initial_retry_delay: initial_retry_delay, max_retry_delay: max_retry_delay, + headers: headers, idempotency_header: idempotency_header ) From 745a900f984941c1c00951c020a74007639e18da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 23:15:17 +0000 Subject: [PATCH 08/22] feat(api): api update --- .stats.yml | 2 +- ...rnal_plan_id_create_plan_version_params.rb | 578 +++- .../models/beta_create_plan_version_params.rb | 578 +++- .../models/changed_subscription_resources.rb | 4 +- lib/orb/models/invoice.rb | 4 +- .../models/invoice_fetch_upcoming_response.rb | 4 +- .../invoice_line_item_create_response.rb | 4 +- lib/orb/models/per_price_cost.rb | 4 +- lib/orb/models/plan.rb | 4 +- lib/orb/models/plan_create_params.rb | 283 +- lib/orb/models/plan_version.rb | 4 +- lib/orb/models/price.rb | 454 ++- lib/orb/models/price_create_params.rb | 266 +- .../models/price_evaluate_multiple_params.rb | 279 +- .../price_evaluate_preview_events_params.rb | 279 +- lib/orb/models/price_interval.rb | 4 +- lib/orb/models/subscription_create_params.rb | 578 +++- .../subscription_price_intervals_params.rb | 279 +- ...ubscription_schedule_plan_change_params.rb | 578 +++- lib/orb/resources/prices.rb | 10 +- lib/orb/resources/prices/external_price_id.rb | 4 +- ...nal_plan_id_create_plan_version_params.rbi | 2096 +++++++++---- .../beta_create_plan_version_params.rbi | 2084 +++++++++---- .../models/changed_subscription_resources.rbi | 1 + rbi/orb/models/invoice.rbi | 1 + .../invoice_fetch_upcoming_response.rbi | 1 + .../invoice_line_item_create_response.rbi | 1 + rbi/orb/models/per_price_cost.rbi | 1 + rbi/orb/models/plan.rbi | 1 + rbi/orb/models/plan_create_params.rbi | 459 +++ rbi/orb/models/plan_version.rbi | 1 + rbi/orb/models/price.rbi | 793 +++++ rbi/orb/models/price_create_params.rbi | 447 +++ .../models/price_evaluate_multiple_params.rbi | 447 +++ .../price_evaluate_preview_events_params.rbi | 447 +++ rbi/orb/models/price_interval.rbi | 1 + rbi/orb/models/subscription_create_params.rbi | 2760 ++++++++++------ .../subscription_price_intervals_params.rbi | 447 +++ ...bscription_schedule_plan_change_params.rbi | 2774 +++++++++++------ rbi/orb/resources/prices.rbi | 1 + ...nal_plan_id_create_plan_version_params.rbs | 370 +++ .../beta_create_plan_version_params.rbs | 370 +++ sig/orb/models/plan_create_params.rbs | 185 ++ sig/orb/models/price.rbs | 329 ++ sig/orb/models/price_create_params.rbs | 175 ++ .../models/price_evaluate_multiple_params.rbs | 180 ++ .../price_evaluate_preview_events_params.rbs | 180 ++ sig/orb/models/subscription_create_params.rbs | 370 +++ .../subscription_price_intervals_params.rbs | 180 ++ ...bscription_schedule_plan_change_params.rbs | 370 +++ .../prices/external_price_id_test.rb | 66 + test/orb/resources/prices_test.rb | 132 + 52 files changed, 16785 insertions(+), 3085 deletions(-) diff --git a/.stats.yml b/.stats.yml index b7d3a1ab0..e2aab1328 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-07428f2af8d77b3af7d838375b0fb5adce7fba2c8312ca84bcd8ef340d782bbc.yml -openapi_spec_hash: 99d6e3e97bab8a25399a63f3db134542 +openapi_spec_hash: bba0e6257d3d2f8612c5ad14b95839e2 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb index 3a5836bb3..dbe3f141c 100644 --- a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +++ b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb @@ -172,7 +172,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price }, nil?: true @@ -184,7 +184,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -502,6 +502,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent } @@ -1484,6 +1487,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1926,7 +2209,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] end end @@ -2050,7 +2333,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price }, nil?: true @@ -2064,7 +2347,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to replace this price from. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -2382,6 +2665,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent } @@ -3364,6 +3650,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -3806,7 +4372,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/beta_create_plan_version_params.rb b/lib/orb/models/beta_create_plan_version_params.rb index 46fedfeed..c752f807f 100644 --- a/lib/orb/models/beta_create_plan_version_params.rb +++ b/lib/orb/models/beta_create_plan_version_params.rb @@ -158,7 +158,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -168,7 +168,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -481,6 +481,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } @@ -1450,6 +1453,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1889,7 +2172,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] end end @@ -2010,7 +2293,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -2022,7 +2305,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to replace this price from. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -2335,6 +2618,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent } @@ -3308,6 +3594,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -3749,7 +4315,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/changed_subscription_resources.rb b/lib/orb/models/changed_subscription_resources.rb index b6335a99f..8474ef9f9 100644 --- a/lib/orb/models/changed_subscription_resources.rb +++ b/lib/orb/models/changed_subscription_resources.rb @@ -852,7 +852,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -919,7 +919,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index 5d8b4080c..0b92ba559 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -806,7 +806,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -871,7 +871,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 29e42ad3c..730479c08 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -807,7 +807,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -873,7 +873,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_line_item_create_response.rb b/lib/orb/models/invoice_line_item_create_response.rb index 3b52bb57c..5cd740f1c 100644 --- a/lib/orb/models/invoice_line_item_create_response.rb +++ b/lib/orb/models/invoice_line_item_create_response.rb @@ -83,7 +83,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -149,7 +149,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/per_price_cost.rb b/lib/orb/models/per_price_cost.rb index 4b7171450..4f092d866 100644 --- a/lib/orb/models/per_price_cost.rb +++ b/lib/orb/models/per_price_cost.rb @@ -6,7 +6,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel # @!attribute price # The price object # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute price_id @@ -34,7 +34,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel optional :quantity, Float, nil?: true # @!method initialize(price:, price_id:, subtotal:, total:, quantity: nil) - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object # # @param price_id [String] The price the cost is associated with # diff --git a/lib/orb/models/plan.rb b/lib/orb/models/plan.rb index 404c2f123..b0e186b7b 100644 --- a/lib/orb/models/plan.rb +++ b/lib/orb/models/plan.rb @@ -138,7 +138,7 @@ class Plan < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute product @@ -208,7 +208,7 @@ class Plan < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param product [Orb::Models::Plan::Product] # diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index 1cf0c7055..53220e806 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -136,7 +136,7 @@ class Price < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -146,7 +146,7 @@ class Price < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::PlanCreateParams::Price#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -453,6 +453,8 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::PlanCreateParams::Price::Price::Percent } @@ -1415,6 +1417,281 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance} for more + # details. + # + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1847,7 +2124,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] end end diff --git a/lib/orb/models/plan_version.rb b/lib/orb/models/plan_version.rb index 8a3247a24..56c9d97fb 100644 --- a/lib/orb/models/plan_version.rb +++ b/lib/orb/models/plan_version.rb @@ -25,7 +25,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute version @@ -46,7 +46,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param version [Integer] diff --git a/lib/orb/models/price.rb b/lib/orb/models/price.rb index bfb97a6be..cefffb2fe 100644 --- a/lib/orb/models/price.rb +++ b/lib/orb/models/price.rb @@ -73,6 +73,8 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, -> { Orb::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::Price::MinimumComposite } variant :percent, -> { Orb::Price::Percent } @@ -11470,6 +11472,456 @@ class LicenseType < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::BillingMode] + required :billing_mode, enum: -> { Orb::Price::DailyCreditAllowance::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::Price::DailyCreditAllowance::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter] }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::DailyCreditAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # 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`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::PriceType] + required :price_type, enum: -> { Orb::Price::DailyCreditAllowance::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # 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. + # + # @return [Orb::Models::Price::DailyCreditAllowance::LicenseType, nil] + optional :license_type, -> { Orb::Price::DailyCreditAllowance::LicenseType }, nil?: true + + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, daily_credit_allowance_config:, 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:, dimensional_price_configuration: nil, license_type: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::DailyCreditAllowance::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::DailyCreditAllowance::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param daily_credit_allowance_config [Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::DailyCreditAllowance::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::DailyCreditAllowance::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # @see Orb::Models::Price::DailyCreditAllowance#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} for more + # details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + + # @see Orb::Models::Price::DailyCreditAllowance#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::DailyCreditAllowance#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::LicenseType} for more details. + # + # 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. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + class MinimumComposite < Orb::Internal::Type::BaseModel # @!attribute id # @@ -12647,7 +13099,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] + # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index ff7703d6f..f4f599fd9 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -10,11 +10,11 @@ class PriceCreateParams < Orb::Internal::Type::BaseModel # @!attribute body # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] required :body, union: -> { Orb::PriceCreateParams::Body } # @!method initialize(body:, request_options: {}) - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -80,6 +80,8 @@ module Body variant :cumulative_grouped_allocation, -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation } + variant :daily_credit_allowance, -> { Orb::PriceCreateParams::Body::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceCreateParams::Body::Percent } @@ -765,6 +767,264 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance} for more details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceCreateParams::Body::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1169,7 +1429,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_multiple_params.rb b/lib/orb/models/price_evaluate_multiple_params.rb index d068cc760..07e8bfc66 100644 --- a/lib/orb/models/price_evaluate_multiple_params.rb +++ b/lib/orb/models/price_evaluate_multiple_params.rb @@ -86,7 +86,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price }, nil?: true # @!attribute price_id @@ -107,7 +107,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -178,6 +178,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent } @@ -881,6 +884,276 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1302,7 +1575,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_preview_events_params.rb b/lib/orb/models/price_evaluate_preview_events_params.rb index 9efa6f4c9..7d77832c8 100644 --- a/lib/orb/models/price_evaluate_preview_events_params.rb +++ b/lib/orb/models/price_evaluate_preview_events_params.rb @@ -144,7 +144,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price @@ -170,7 +170,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -241,6 +241,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent } @@ -952,6 +955,276 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1374,7 +1647,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_interval.rb b/lib/orb/models/price_interval.rb index 5dd678086..e046bf3f8 100644 --- a/lib/orb/models/price_interval.rb +++ b/lib/orb/models/price_interval.rb @@ -72,7 +72,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute start_date @@ -122,7 +122,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # # @param fixed_fee_quantity_transitions [Array, nil] The fixed fee quantity transitions for this price interval. This is only relevan # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f # diff --git a/lib/orb/models/subscription_create_params.rb b/lib/orb/models/subscription_create_params.rb index 5ec065b60..f1fee1158 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -449,7 +449,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionCreateParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -486,7 +486,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -559,6 +559,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionCreateParams::AddPrice::Price::Percent } @@ -1527,6 +1530,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1966,7 +2249,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] end end @@ -2117,7 +2400,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price }, nil?: true # @!attribute price_id @@ -2146,7 +2429,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. @@ -2218,6 +2501,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent } @@ -3187,6 +3473,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -3627,7 +4193,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 5368b82f2..89dff721d 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -163,7 +163,7 @@ class Add < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price }, nil?: true # @!attribute price_id @@ -209,7 +209,7 @@ class Add < Orb::Internal::Type::BaseModel # # @param minimum_amount [Float, nil] The minimum amount that will be billed for this price interval for a given billi # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -409,6 +409,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent } @@ -1112,6 +1115,276 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1531,7 +1804,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] end end diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index 1a7ac6c11..6cbacb02d 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -421,7 +421,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -458,7 +458,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -533,6 +533,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent } @@ -1506,6 +1509,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1948,7 +2231,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] end end @@ -2102,7 +2385,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price @@ -2136,7 +2419,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. @@ -2209,6 +2492,9 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent } @@ -3190,6 +3476,286 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -3632,7 +4198,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/resources/prices.rb b/lib/orb/resources/prices.rb index 267d239c8..ef7c712a0 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -39,11 +39,11 @@ class Prices # # @overload create(body:, request_options: {}) # - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceCreateParams def create(params) @@ -72,7 +72,7 @@ def create(params) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceUpdateParams def update(price_id, params = {}) @@ -100,7 +100,7 @@ def update(price_id, params = {}) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Internal::Page] + # @return [Orb::Internal::Page] # # @see Orb::Models::PriceListParams def list(params = {}) @@ -293,7 +293,7 @@ def evaluate_preview_events(params) # @param price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceFetchParams def fetch(price_id, params = {}) diff --git a/lib/orb/resources/prices/external_price_id.rb b/lib/orb/resources/prices/external_price_id.rb index c8a3e738a..10a6cd936 100644 --- a/lib/orb/resources/prices/external_price_id.rb +++ b/lib/orb/resources/prices/external_price_id.rb @@ -29,7 +29,7 @@ class ExternalPriceID # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDUpdateParams def update(external_price_id, params = {}) @@ -52,7 +52,7 @@ def update(external_price_id, params = {}) # @param external_price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDFetchParams def fetch(external_price_id, params = {}) diff --git a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi index db6b316c6..ea9a836cb 100644 --- a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +++ b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi @@ -383,6 +383,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -431,6 +432,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::OrHash @@ -490,6 +492,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -960,6 +963,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -2622,11 +2626,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2634,11 +2638,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2651,22 +2671,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2768,11 +2772,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2802,12 +2806,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2846,7 +2850,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :daily_credit_allowance ) end @@ -2854,12 +2858,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2897,7 +2901,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2905,38 +2909,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -2944,38 +2948,144 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -2983,27 +3093,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3016,6 +3110,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3117,11 +3227,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3151,12 +3261,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3195,7 +3305,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3203,12 +3313,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3246,7 +3356,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3254,38 +3364,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3293,83 +3403,432 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for event_output pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash ) end @@ -3626,6 +4085,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -3675,6 +4135,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash @@ -3737,6 +4198,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -4107,141 +4569,602 @@ module Orb sig { returns(String) } attr_accessor :currency - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, + # When True, overage beyond the allocation is written off. + write_off_overage: nil + ) + end + + sig do + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } + ) + end + def to_hash + end + end + + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) } ) end def to_hash end - end - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params( + property_key: String, + property_value: String + ).returns(T.attached_class) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil ) + end + + sig do + override.returns( + { + unit_amount: String, + tier_lower_bound: T.nilable(String) + } + ) + end + def to_hash + end end - OrSymbol = T.type_alias { T.any(Symbol, String) } + end - UNIT = - T.let( - :unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ) + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ] - ) - end - def self.values - end - end - end + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4258,6 +5181,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4358,12 +5297,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4391,14 +5330,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4437,20 +5376,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4480,52 +5419,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) - # Property filters to apply (all must match) sig do - returns( + override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end - attr_accessor :filters + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Internal::AnyHash + ) + end - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -4533,13 +5513,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -4547,153 +5523,54 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do params( - unit_amount: String, - tier_lower_bound: T.nilable(String) + tier_lower_bound: String, + unit_amount: String ).returns(T.attached_class) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -4701,11 +5578,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -4718,22 +5611,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4835,11 +5712,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4869,12 +5746,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4913,7 +5790,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -4921,12 +5798,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4964,7 +5841,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4972,38 +5849,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -5011,103 +5888,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key - # Configuration for tiered_with_proration pricing + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -5115,26 +5961,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5249,9 +6095,9 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5283,8 +6129,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5327,7 +6173,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -5335,9 +6181,9 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -5378,7 +6224,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5386,38 +6232,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -5425,59 +6271,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -5486,11 +6332,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -5498,26 +6344,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5632,9 +6478,9 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5666,8 +6512,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5710,7 +6556,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -5718,9 +6564,9 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -5761,7 +6607,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5769,38 +6615,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -5808,64 +6654,136 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The amount to charge for each unit outside of the allocation + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :event_day_property - # Configuration for cumulative_grouped_allocation pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end diff --git a/rbi/orb/models/beta_create_plan_version_params.rbi b/rbi/orb/models/beta_create_plan_version_params.rbi index 2ac29ca83..340933fc4 100644 --- a/rbi/orb/models/beta_create_plan_version_params.rbi +++ b/rbi/orb/models/beta_create_plan_version_params.rbi @@ -335,6 +335,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -383,6 +384,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::OrHash @@ -442,6 +444,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -912,6 +915,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -2569,11 +2573,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2581,11 +2585,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2598,22 +2618,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2715,11 +2719,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2749,12 +2753,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2793,7 +2797,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :daily_credit_allowance ) end @@ -2801,12 +2805,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2844,7 +2848,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2852,38 +2856,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -2891,38 +2895,144 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -2930,27 +3040,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2963,6 +3057,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3064,11 +3174,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3098,12 +3208,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3142,7 +3252,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3150,12 +3260,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3193,7 +3303,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3201,38 +3311,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3240,78 +3350,427 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - class RemoveAdjustment < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for event_output pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( @@ -3573,6 +4032,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -3622,6 +4082,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash @@ -3684,6 +4145,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -4050,145 +4512,602 @@ module Orb sig { returns(String) } attr_accessor :amount - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency + + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, + # When True, overage beyond the allocation is written off. + write_off_overage: nil + ) + end + + sig do + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } + ) + end + def to_hash + end + end + + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) } ) end def to_hash end - end - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end end - OrSymbol = T.type_alias { T.any(Symbol, String) } + end - UNIT = - T.let( - :unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ) + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ] - ) - end - def self.values - end - end - end + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4205,6 +5124,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4305,12 +5240,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4338,14 +5273,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4384,20 +5319,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4427,52 +5362,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) - # Property filters to apply (all must match) sig do - returns( + override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end - attr_accessor :filters + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Internal::AnyHash + ) + end - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -4480,13 +5456,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -4494,149 +5466,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -4644,11 +5520,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -4661,22 +5553,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4778,11 +5654,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4812,12 +5688,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4856,7 +5732,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -4864,12 +5740,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4907,7 +5783,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4915,38 +5791,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -4954,102 +5830,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key - # Configuration for tiered_with_proration pricing + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -5057,26 +5903,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5191,9 +6037,9 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5225,8 +6071,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5269,7 +6115,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -5277,9 +6123,9 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -5320,7 +6166,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5328,38 +6174,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -5367,59 +6213,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -5428,11 +6274,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -5440,26 +6286,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5574,9 +6420,9 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5608,8 +6454,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5652,7 +6498,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -5660,9 +6506,9 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -5703,7 +6549,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5711,38 +6557,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -5750,64 +6596,136 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The amount to charge for each unit outside of the allocation + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :event_day_property - # Configuration for cumulative_grouped_allocation pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end diff --git a/rbi/orb/models/changed_subscription_resources.rbi b/rbi/orb/models/changed_subscription_resources.rbi index b32e96404..cdcb94d89 100644 --- a/rbi/orb/models/changed_subscription_resources.rbi +++ b/rbi/orb/models/changed_subscription_resources.rbi @@ -1412,6 +1412,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice.rbi b/rbi/orb/models/invoice.rbi index 882e64a5f..bb842b789 100644 --- a/rbi/orb/models/invoice.rbi +++ b/rbi/orb/models/invoice.rbi @@ -1217,6 +1217,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/orb/models/invoice_fetch_upcoming_response.rbi index 6b306e105..3df35998b 100644 --- a/rbi/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/orb/models/invoice_fetch_upcoming_response.rbi @@ -1320,6 +1320,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice_line_item_create_response.rbi b/rbi/orb/models/invoice_line_item_create_response.rbi index a3098fb45..0fd3d126e 100644 --- a/rbi/orb/models/invoice_line_item_create_response.rbi +++ b/rbi/orb/models/invoice_line_item_create_response.rbi @@ -159,6 +159,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/per_price_cost.rbi b/rbi/orb/models/per_price_cost.rbi index 2cf5ad6bb..70a6e23b1 100644 --- a/rbi/orb/models/per_price_cost.rbi +++ b/rbi/orb/models/per_price_cost.rbi @@ -57,6 +57,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/plan.rbi b/rbi/orb/models/plan.rbi index e7f8296af..37b5179f7 100644 --- a/rbi/orb/models/plan.rbi +++ b/rbi/orb/models/plan.rbi @@ -191,6 +191,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/plan_create_params.rbi b/rbi/orb/models/plan_create_params.rbi index 48a9380c3..08d699b23 100644 --- a/rbi/orb/models/plan_create_params.rbi +++ b/rbi/orb/models/plan_create_params.rbi @@ -208,6 +208,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -256,6 +257,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::OrHash, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::PlanCreateParams::Price::Price::Percent::OrHash, Orb::PlanCreateParams::Price::Price::EventOutput::OrHash @@ -313,6 +315,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -783,6 +786,7 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -2440,6 +2444,461 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/plan_version.rbi b/rbi/orb/models/plan_version.rbi index ecce6a236..ddca90d74 100644 --- a/rbi/orb/models/plan_version.rbi +++ b/rbi/orb/models/plan_version.rbi @@ -71,6 +71,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/price.rbi b/rbi/orb/models/price.rbi index e858b9ef2..547173faa 100644 --- a/rbi/orb/models/price.rbi +++ b/rbi/orb/models/price.rbi @@ -46,6 +46,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk, Orb::Price::CumulativeGroupedAllocation, + Orb::Price::DailyCreditAllowance, Orb::Price::MinimumComposite, Orb::Price::Percent, Orb::Price::EventOutput @@ -20060,6 +20061,798 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Price::DailyCreditAllowance, Orb::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig do + returns(Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol) + end + attr_accessor :billing_mode + + sig { returns(Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol) } + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::DailyCreditAllowance::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns(Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # 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`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + returns(Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol) + end + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # 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. + sig do + returns(T.nilable(Orb::Price::DailyCreditAllowance::LicenseType)) + end + attr_reader :license_type + + sig do + params( + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType::OrHash) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: + Orb::Price::DailyCreditAllowance::BillingMode::OrSymbol, + cadence: Orb::Price::DailyCreditAllowance::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + currency: String, + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::DailyCreditAllowance::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType::OrHash), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + id:, + billable_metric:, + billing_cycle_configuration:, + billing_mode:, + cadence:, + composite_price_filters:, + conversion_rate:, + conversion_rate_config:, + created_at:, + credit_allocation:, + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + discount:, + external_price_id:, + fixed_price_quantity:, + invoice_grouping_key:, + invoicing_cycle_configuration:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + maximum:, + maximum_amount:, + # 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`. + metadata:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # 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. + license_type: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol, + cadence: Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::DailyCreditAllowance::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + currency: String, + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::DailyCreditAllowance::BillingMode) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::DailyCreditAllowance::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ANNUAL = + T.let( + :annual, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::DailyCreditAllowance::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # 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. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + class MinimumComposite < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_create_params.rbi b/rbi/orb/models/price_create_params.rbi index 3c986f288..e05b578cc 100644 --- a/rbi/orb/models/price_create_params.rbi +++ b/rbi/orb/models/price_create_params.rbi @@ -41,6 +41,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::PriceCreateParams::Body::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -81,6 +82,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, + Orb::PriceCreateParams::Body::DailyCreditAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceCreateParams::Body::Percent::OrHash, Orb::PriceCreateParams::Body::EventOutput::OrHash @@ -128,6 +130,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::PriceCreateParams::Body::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -174,6 +177,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::PriceCreateParams::Body::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -1382,6 +1386,449 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_multiple_params.rbi b/rbi/orb/models/price_evaluate_multiple_params.rbi index 74a91dd77..c2adcdaca 100644 --- a/rbi/orb/models/price_evaluate_multiple_params.rbi +++ b/rbi/orb/models/price_evaluate_multiple_params.rbi @@ -151,6 +151,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -201,6 +202,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput::OrHash @@ -269,6 +271,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -316,6 +319,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -1524,6 +1528,449 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_preview_events_params.rbi b/rbi/orb/models/price_evaluate_preview_events_params.rbi index d66854829..c2709a947 100644 --- a/rbi/orb/models/price_evaluate_preview_events_params.rbi +++ b/rbi/orb/models/price_evaluate_preview_events_params.rbi @@ -252,6 +252,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -302,6 +303,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput::OrHash @@ -370,6 +372,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -417,6 +420,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -1625,6 +1629,449 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_interval.rbi b/rbi/orb/models/price_interval.rbi index 2122ad695..1c6911997 100644 --- a/rbi/orb/models/price_interval.rbi +++ b/rbi/orb/models/price_interval.rbi @@ -117,6 +117,7 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/subscription_create_params.rbi b/rbi/orb/models/subscription_create_params.rbi index 4c6d35e1e..2593c64e1 100644 --- a/rbi/orb/models/subscription_create_params.rbi +++ b/rbi/orb/models/subscription_create_params.rbi @@ -616,6 +616,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -676,6 +677,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::Percent::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::OrHash @@ -762,6 +764,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -810,6 +813,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -2467,11 +2471,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2479,11 +2483,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2496,22 +2516,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for percent pricing - sig do - returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2613,11 +2617,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2647,12 +2651,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2691,7 +2695,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :daily_credit_allowance ) end @@ -2699,12 +2703,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2742,7 +2746,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2750,38 +2754,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -2789,38 +2793,144 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -2828,27 +2938,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2861,6 +2955,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2962,11 +3072,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2996,12 +3106,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3040,7 +3150,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3048,12 +3158,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3091,7 +3201,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3099,38 +3209,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3138,572 +3248,1381 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] - ) - end - def self.variants - end - end - end - - module ExternalMarketplace - extend Orb::Internal::Type::Enum + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - GOOGLE = - T.let( - :google, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AWS = - T.let( - :aws, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AZURE = - T.let( - :azure, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ] - ) - end - def self.values - end - end + sig do + params( + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - sig do + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] + ) + end + def self.variants + end + end + end + + module ExternalMarketplace + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GOOGLE = + T.let( + :google, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AWS = + T.let( + :aws, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AZURE = + T.let( + :azure, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ] + ) + end + def self.values + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + external_price_id: T.nilable(String), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do override.returns( T::Array[ Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants ] ) - end - def self.variants - end + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ) + ) end - end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::NewSubscriptionMinimumCompositePrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput::OrHash + ) + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice, - Orb::Internal::AnyHash + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) - end + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end + end + end - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewSubscriptionMinimumCompositePrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput::OrHash - ) - ), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the subscription. - replaces_price_id:, - # The definition of a new allocation price to create and add to the subscription. - allocation_price: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - discounts: nil, - # The external price id of the price to add to the subscription. - external_price_id: nil, - # The new quantity of the price, if the price is a fixed price. - fixed_price_quantity: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - maximum_amount: nil, - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - metric_parameter_overrides: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - minimum_amount: nil, - # New subscription price request body params. - price: nil, - # The id of the price to add to the subscription. - price_id: nil - ) - end + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - discounts: T.nilable(T::Array[Orb::DiscountOverride]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: - T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence ) - ), - price_id: T.nilable(String) - } - ) - end - def to_hash - end + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # New subscription price request body params. - module Price - extend Orb::Internal::Type::Union + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) - Variants = - T.type_alias do - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput - ) + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3720,6 +4639,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3820,12 +4755,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3853,14 +4788,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3899,20 +4834,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3942,52 +4877,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) - # Property filters to apply (all must match) sig do - returns( + override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end - attr_accessor :filters + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Internal::AnyHash + ) + end - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -3995,13 +4971,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -4009,149 +4981,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -4159,11 +5035,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -4176,22 +5068,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4293,11 +5169,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4327,12 +5203,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4371,7 +5247,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -4379,12 +5255,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4422,7 +5298,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4430,38 +5306,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -4469,102 +5345,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key - # Configuration for tiered_with_proration pricing + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -4572,26 +5418,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -4706,9 +5552,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -4740,8 +5586,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -4784,7 +5630,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -4792,9 +5638,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -4835,7 +5681,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4843,38 +5689,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -4882,59 +5728,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -4943,11 +5789,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -4955,26 +5801,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5089,9 +5935,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5123,8 +5969,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5167,7 +6013,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -5175,9 +6021,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -5218,7 +6064,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5226,38 +6072,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -5265,64 +6111,136 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The amount to charge for each unit outside of the allocation + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :event_day_property - # Configuration for cumulative_grouped_allocation pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end diff --git a/rbi/orb/models/subscription_price_intervals_params.rbi b/rbi/orb/models/subscription_price_intervals_params.rbi index e970bbfc3..6ede69c50 100644 --- a/rbi/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/orb/models/subscription_price_intervals_params.rbi @@ -278,6 +278,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -359,6 +360,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput::OrHash @@ -476,6 +478,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -737,6 +740,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -1945,6 +1949,449 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/orb/models/subscription_schedule_plan_change_params.rbi index c3ce458d7..d4111a459 100644 --- a/rbi/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/orb/models/subscription_schedule_plan_change_params.rbi @@ -673,6 +673,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -733,6 +734,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::OrHash @@ -819,6 +821,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -867,6 +870,7 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -2524,11 +2528,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2536,11 +2540,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2553,22 +2573,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for percent pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2670,11 +2674,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2704,12 +2708,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2748,7 +2752,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :daily_credit_allowance ) end @@ -2756,12 +2760,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2799,7 +2803,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2807,38 +2811,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -2846,38 +2850,144 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -2885,27 +2995,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2918,6 +3012,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3019,11 +3129,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3053,12 +3163,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3097,7 +3207,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3105,12 +3215,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3148,7 +3258,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3156,38 +3266,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3195,261 +3305,610 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - # Reset billing periods to be aligned with the plan change's effective date or - # start of the month. Defaults to `unchanged` which keeps subscription's existing - # billing cycle alignment. - module BillingCycleAlignment - extend Orb::Internal::Type::Enum + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - UNCHANGED = - T.let( - :unchanged, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - PLAN_CHANGE_DATE = - T.let( - :plan_change_date, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - START_OF_MONTH = - T.let( - :start_of_month, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) + sig do + params( + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ] - ) - end - def self.values - end - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. + module BillingCycleAlignment + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNCHANGED = + T.let( + :unchanged, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + PLAN_CHANGE_DATE = + T.let( + :plan_change_date, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + START_OF_MONTH = + T.let( + :start_of_month, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ] + ) + end + def self.values + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + external_price_id: T.nilable(String), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, Orb::NewUsageDiscount, Orb::NewAmountDiscount, Orb::NewMinimum, @@ -3457,318 +3916,778 @@ module Orb ) end - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::NewSubscriptionMinimumCompositePrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash + ) + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, - Orb::Internal::AnyHash + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) - end + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end + end + end - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewSubscriptionMinimumCompositePrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash - ) - ), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the subscription. - replaces_price_id:, - # The definition of a new allocation price to create and add to the subscription. - allocation_price: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - discounts: nil, - # The external price id of the price to add to the subscription. - external_price_id: nil, - # The new quantity of the price, if the price is a fixed price. - fixed_price_quantity: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - maximum_amount: nil, - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - metric_parameter_overrides: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - minimum_amount: nil, - # New subscription price request body params. - price: nil, - # The id of the price to add to the subscription. - price_id: nil - ) - end + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - discounts: T.nilable(T::Array[Orb::DiscountOverride]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: - T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence ) - ), - price_id: T.nilable(String) - } - ) - end - def to_hash - end + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # New subscription price request body params. - module Price - extend Orb::Internal::Type::Union + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) - Variants = - T.type_alias do - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput - ) + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3785,6 +4704,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3885,12 +4820,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3918,14 +4853,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3964,20 +4899,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4007,52 +4942,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) - # Property filters to apply (all must match) sig do - returns( + override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end - attr_accessor :filters + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Internal::AnyHash + ) + end - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -4060,13 +5036,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -4074,149 +5046,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -4224,11 +5100,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -4241,22 +5133,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4358,11 +5234,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4392,12 +5268,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4436,7 +5312,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -4444,12 +5320,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4487,7 +5363,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4495,38 +5371,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -4534,102 +5410,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key - # Configuration for tiered_with_proration pricing + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -4637,26 +5483,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -4771,9 +5617,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -4805,8 +5651,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -4849,7 +5695,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -4857,9 +5703,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -4900,7 +5746,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4908,38 +5754,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -4947,59 +5793,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -5008,11 +5854,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -5020,26 +5866,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5154,9 +6000,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5188,8 +6034,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5232,7 +6078,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -5240,9 +6086,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -5283,7 +6129,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5291,38 +6137,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -5330,64 +6176,136 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The amount to charge for each unit outside of the allocation + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :event_day_property - # Configuration for cumulative_grouped_allocation pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end diff --git a/rbi/orb/resources/prices.rbi b/rbi/orb/resources/prices.rbi index c2143f9f5..e5b5c9f95 100644 --- a/rbi/orb/resources/prices.rbi +++ b/rbi/orb/resources/prices.rbi @@ -68,6 +68,7 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, + Orb::PriceCreateParams::Body::DailyCreditAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceCreateParams::Body::Percent::OrHash, Orb::PriceCreateParams::Body::EventOutput::OrHash diff --git a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs index 3c336fd27..eed66248b 100644 --- a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +++ b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs @@ -324,6 +324,7 @@ module Orb | Orb::NewPlanScalableMatrixWithTieredPricingPrice | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance | Orb::NewPlanMinimumCompositePrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -1000,6 +1001,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, @@ -1599,6 +1784,7 @@ module Orb | Orb::NewPlanScalableMatrixWithTieredPricingPrice | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance | Orb::NewPlanMinimumCompositePrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -2275,6 +2461,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::cadence, diff --git a/sig/orb/models/beta_create_plan_version_params.rbs b/sig/orb/models/beta_create_plan_version_params.rbs index ebd774dfa..90d1c96e5 100644 --- a/sig/orb/models/beta_create_plan_version_params.rbs +++ b/sig/orb/models/beta_create_plan_version_params.rbs @@ -318,6 +318,7 @@ module Orb | Orb::NewPlanScalableMatrixWithTieredPricingPrice | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance | Orb::NewPlanMinimumCompositePrice | Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent | Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -991,6 +992,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, @@ -1582,6 +1767,7 @@ module Orb | Orb::NewPlanScalableMatrixWithTieredPricingPrice | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance | Orb::NewPlanMinimumCompositePrice | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -2255,6 +2441,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::cadence, diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index c131fe2e9..8d1b46acd 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -297,6 +297,7 @@ module Orb | Orb::NewPlanScalableMatrixWithTieredPricingPrice | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation + | Orb::PlanCreateParams::Price::Price::DailyCreditAllowance | Orb::NewPlanMinimumCompositePrice | Orb::PlanCreateParams::Price::Price::Percent | Orb::PlanCreateParams::Price::Price::EventOutput @@ -970,6 +971,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::PlanCreateParams::Price::Price::Percent::cadence, diff --git a/sig/orb/models/price.rbs b/sig/orb/models/price.rbs index d9d260878..410a1e276 100644 --- a/sig/orb/models/price.rbs +++ b/sig/orb/models/price.rbs @@ -29,6 +29,7 @@ module Orb | Orb::Price::ScalableMatrixWithTieredPricing | Orb::Price::CumulativeGroupedBulk | Orb::Price::CumulativeGroupedAllocation + | Orb::Price::DailyCreditAllowance | Orb::Price::MinimumComposite | Orb::Price::Percent | Orb::Price::EventOutput @@ -8531,6 +8532,334 @@ module Orb end end + type daily_credit_allowance = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :daily_credit_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::DailyCreditAllowance::LicenseType? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode + + attr_accessor cadence: Orb::Models::Price::DailyCreditAllowance::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::DailyCreditAllowance::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::DailyCreditAllowance::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, + replaces_price_id: String?, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::DailyCreditAllowance::LicenseType?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :daily_credit_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::DailyCreditAllowance::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator] + end + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::price_type] + end + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + type minimum_composite = { id: String, diff --git a/sig/orb/models/price_create_params.rbs b/sig/orb/models/price_create_params.rbs index a3562fbc5..182529530 100644 --- a/sig/orb/models/price_create_params.rbs +++ b/sig/orb/models/price_create_params.rbs @@ -49,6 +49,7 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceCreateParams::Body::CumulativeGroupedAllocation + | Orb::PriceCreateParams::Body::DailyCreditAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceCreateParams::Body::Percent | Orb::PriceCreateParams::Body::EventOutput @@ -526,6 +527,180 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::PriceCreateParams::Body::Percent::cadence, diff --git a/sig/orb/models/price_evaluate_multiple_params.rbs b/sig/orb/models/price_evaluate_multiple_params.rbs index 61cbdc7df..188a4c38a 100644 --- a/sig/orb/models/price_evaluate_multiple_params.rbs +++ b/sig/orb/models/price_evaluate_multiple_params.rbs @@ -118,6 +118,7 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation + | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -613,6 +614,185 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::cadence, diff --git a/sig/orb/models/price_evaluate_preview_events_params.rbs b/sig/orb/models/price_evaluate_preview_events_params.rbs index b59ef66f5..c4b00e05a 100644 --- a/sig/orb/models/price_evaluate_preview_events_params.rbs +++ b/sig/orb/models/price_evaluate_preview_events_params.rbs @@ -164,6 +164,7 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation + | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -659,6 +660,185 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_create_params.rbs b/sig/orb/models/subscription_create_params.rbs index 0fdf79d24..8bc42f6e5 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -324,6 +324,7 @@ module Orb | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionCreateParams::AddPrice::Price::Percent | Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -997,6 +998,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, @@ -1456,6 +1641,7 @@ module Orb | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent | Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput @@ -2129,6 +2315,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_price_intervals_params.rbs b/sig/orb/models/subscription_price_intervals_params.rbs index 008136199..297e0a916 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -267,6 +267,7 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation + | Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent | Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -762,6 +763,185 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index 875f59dbe..a0faa537c 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -305,6 +305,7 @@ module Orb | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -978,6 +979,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, @@ -1438,6 +1623,7 @@ module Orb | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput @@ -2111,6 +2297,190 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + type percent = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::cadence, diff --git a/test/orb/resources/prices/external_price_id_test.rb b/test/orb/resources/prices/external_price_id_test.rb index 19758d1bd..27e0f29ee 100644 --- a/test/orb/resources/prices/external_price_id_test.rb +++ b/test/orb/resources/prices/external_price_id_test.rb @@ -40,6 +40,7 @@ def test_update in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -944,6 +945,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -1081,6 +1114,7 @@ def test_fetch in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -1985,6 +2019,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, diff --git a/test/orb/resources/prices_test.rb b/test/orb/resources/prices_test.rb index 403af6c7c..e62064279 100644 --- a/test/orb/resources/prices_test.rb +++ b/test/orb/resources/prices_test.rb @@ -50,6 +50,7 @@ def test_create_required_params in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -954,6 +955,38 @@ def test_create_required_params dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -1091,6 +1124,7 @@ def test_update in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -1995,6 +2029,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -2139,6 +2205,7 @@ def test_list in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -3043,6 +3110,38 @@ def test_list dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -3235,6 +3334,7 @@ def test_fetch in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -4139,6 +4239,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, From 3d031384f66f48cfd22f762cf752309e7c8a7b1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 18:59:37 +0000 Subject: [PATCH 09/22] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e2aab1328..9ab94fe54 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-07428f2af8d77b3af7d838375b0fb5adce7fba2c8312ca84bcd8ef340d782bbc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d1080379457ea30374233b2e8c858bac984467d05b475d38d19180ae34c08355.yml openapi_spec_hash: bba0e6257d3d2f8612c5ad14b95839e2 config_hash: c01c1191b1cd696c7ca855ff6d28a8df From 3507265a487d5eaed06d5479f640949fe48651c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 18:16:40 +0000 Subject: [PATCH 10/22] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9ab94fe54..4bdd4cdb5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d1080379457ea30374233b2e8c858bac984467d05b475d38d19180ae34c08355.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-d1080379457ea30374233b2e8c858bac984467d05b475d38d19180ae34c08355.yml openapi_spec_hash: bba0e6257d3d2f8612c5ad14b95839e2 config_hash: c01c1191b1cd696c7ca855ff6d28a8df From 068ab477e1a9fd21b43f6d737ab2216d180a48ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:23:24 +0000 Subject: [PATCH 11/22] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4bdd4cdb5..e08ddd91c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-d1080379457ea30374233b2e8c858bac984467d05b475d38d19180ae34c08355.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-b13a08bfebe7b2efc4a5f8aa0b69015e2d58435a581b1578e3e67d76fdfb8cb0.yml openapi_spec_hash: bba0e6257d3d2f8612c5ad14b95839e2 config_hash: c01c1191b1cd696c7ca855ff6d28a8df From 57f4509e2c1e6e25913e713a33246805b8ae6474 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 18:14:54 +0000 Subject: [PATCH 12/22] feat(api): api update --- .stats.yml | 4 +- lib/orb/models/alert.rb | 106 ++++++- .../alert_create_for_subscription_params.rb | 115 +++++++- lib/orb/resources/alerts.rb | 6 +- rbi/orb/models/alert.rbi | 175 +++++++++++- .../alert_create_for_subscription_params.rbi | 259 ++++++++++++++++++ rbi/orb/resources/alerts.rbi | 22 ++ sig/orb/models/alert.rbs | 88 +++++- .../alert_create_for_subscription_params.rbs | 84 +++++- sig/orb/resources/alerts.rbs | 2 + test/orb/resources/alerts_test.rb | 32 ++- 11 files changed, 873 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index e08ddd91c..345cd65bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-b13a08bfebe7b2efc4a5f8aa0b69015e2d58435a581b1578e3e67d76fdfb8cb0.yml -openapi_spec_hash: bba0e6257d3d2f8612c5ad14b95839e2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-7f97a69f22372b818e8d24a72f6020bcf2f0c6d6b3ad07abb8395c87ec4a72ee.yml +openapi_spec_hash: a6261e730c54d08ad36f1b946e663fc3 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/alert.rb b/lib/orb/models/alert.rb index ea017f37d..01ca7bb07 100644 --- a/lib/orb/models/alert.rb +++ b/lib/orb/models/alert.rb @@ -87,7 +87,23 @@ class Alert < Orb::Internal::Type::BaseModel # @return [Orb::Models::Alert::LicenseType, nil] optional :license_type, -> { Orb::Alert::LicenseType }, nil?: true - # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil) + # @!attribute price_filters + # Filters scoping which prices are included in grouped cost alert evaluation. + # + # @return [Array, nil] + optional :price_filters, -> { Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter] }, nil?: true + + # @!attribute threshold_overrides + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a replacement threshold list. Only present for grouped + # cost alerts that have at least one override. + # + # @return [Array, nil] + optional :threshold_overrides, + -> { Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride] }, + nil?: true + + # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil, price_filters: nil, threshold_overrides: nil) # Some parameter documentations has been truncated, see {Orb::Models::Alert} for # more details. # @@ -122,6 +138,10 @@ class Alert < Orb::Internal::Type::BaseModel # @param grouping_keys [Array, nil] The property keys to group cost alerts by. Only present for cost alerts with gro # # @param license_type [Orb::Models::Alert::LicenseType, nil] Minified license type for alert serialization. + # + # @param price_filters [Array, nil] Filters scoping which prices are included in grouped cost alert evaluation. + # + # @param threshold_overrides [Array, nil] Per-group threshold overrides. Each override maps a specific combination of grou # @see Orb::Models::Alert#metric class Metric < Orb::Internal::Type::BaseModel @@ -226,6 +246,90 @@ class LicenseType < Orb::Internal::Type::BaseModel # # @param id [String] end + + class PriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Alert::PriceFilter::Field] + required :field, enum: -> { Orb::Alert::PriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Alert::PriceFilter::Operator] + required :operator, enum: -> { Orb::Alert::PriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Alert::PriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Alert::PriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Alert::PriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Alert::PriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + # @!attribute group_values + # The values of the grouping keys that identify this group. The list length + # matches the alert's grouping_keys. + # + # @return [Array] + required :group_values, Orb::Internal::Type::ArrayOf[String] + + # @!attribute thresholds + # The thresholds applied to this group. An empty list means the group is silenced. + # + # @return [Array] + required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] } + + # @!method initialize(group_values:, thresholds:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Alert::ThresholdOverride} for more details. + # + # A per-group threshold override on a grouped cost alert. + # + # An empty `thresholds` list means the group is silenced (never fires). A + # non-empty list fully replaces the default thresholds for that group. + # + # @param group_values [Array] The values of the grouping keys that identify this group. The list length matche + # + # @param thresholds [Array] The thresholds applied to this group. An empty list means the group is silenced. + end end end end diff --git a/lib/orb/models/alert_create_for_subscription_params.rb b/lib/orb/models/alert_create_for_subscription_params.rb index fc7a33710..05a44e4c2 100644 --- a/lib/orb/models/alert_create_for_subscription_params.rb +++ b/lib/orb/models/alert_create_for_subscription_params.rb @@ -37,6 +37,16 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :metric_id, String, nil?: true + # @!attribute price_filters + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + # + # @return [Array, nil] + optional :price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::PriceFilter] }, + nil?: true + # @!attribute pricing_unit_id # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. @@ -44,7 +54,19 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :pricing_unit_id, String, nil?: true - # @!method initialize(subscription_id:, thresholds:, type:, grouping_keys: nil, metric_id: nil, pricing_unit_id: nil, request_options: {}) + # @!attribute threshold_overrides + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + # + # @return [Array, nil] + optional :threshold_overrides, + -> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::ThresholdOverride] }, + nil?: true + + # @!method initialize(subscription_id:, thresholds:, type:, grouping_keys: nil, metric_id: nil, price_filters: nil, pricing_unit_id: nil, threshold_overrides: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::AlertCreateForSubscriptionParams} for more details. # @@ -58,8 +80,12 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel # # @param metric_id [String, nil] The metric to track usage for. # + # @param price_filters [Array, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup + # # @param pricing_unit_id [String, nil] The pricing unit to use for grouped cost alerts. Required when grouping_keys is # + # @param threshold_overrides [Array, nil] Per-group threshold overrides. Each override maps a specific combination of grou + # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # The type of alert to create. This must be a valid alert type. @@ -72,6 +98,93 @@ module Type # @!method self.values # @return [Array] end + + class PriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field] + required :field, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator] + required :operator, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + # @!attribute group_values + # The values of the grouping keys that identify this group. The list length must + # match the alert's grouping_keys, and values appear in the same order as + # grouping_keys. + # + # @return [Array] + required :group_values, Orb::Internal::Type::ArrayOf[String] + + # @!attribute thresholds + # The thresholds to apply to this group. An empty list silences alerts for this + # group. A non-empty list fully replaces the default thresholds for this group. + # + # @return [Array] + required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] } + + # @!method initialize(group_values:, thresholds:) + # Some parameter documentations has been truncated, see + # {Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride} for more + # details. + # + # Per-group threshold override on a grouped cost alert. + # + # - An empty `thresholds` list silences alerts for this group (never fires). + # - A non-empty list fully replaces the default thresholds for this group. + # + # @param group_values [Array] The values of the grouping keys that identify this group. The list length must m + # + # @param thresholds [Array] The thresholds to apply to this group. An empty list silences alerts for this gr + end end end end diff --git a/lib/orb/resources/alerts.rb b/lib/orb/resources/alerts.rb index f6c47103f..0ab0c7433 100644 --- a/lib/orb/resources/alerts.rb +++ b/lib/orb/resources/alerts.rb @@ -194,7 +194,7 @@ def create_for_external_customer(external_customer_id, params) # per metric that is a part of the subscription. Alerts are triggered based on # usage or cost conditions met during the current billing cycle. # - # @overload create_for_subscription(subscription_id, thresholds:, type:, grouping_keys: nil, metric_id: nil, pricing_unit_id: nil, request_options: {}) + # @overload create_for_subscription(subscription_id, thresholds:, type:, grouping_keys: nil, metric_id: nil, price_filters: nil, pricing_unit_id: nil, threshold_overrides: nil, request_options: {}) # # @param subscription_id [String] # @@ -206,8 +206,12 @@ def create_for_external_customer(external_customer_id, params) # # @param metric_id [String, nil] The metric to track usage for. # + # @param price_filters [Array, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup + # # @param pricing_unit_id [String, nil] The pricing unit to use for grouped cost alerts. Required when grouping_keys is # + # @param threshold_overrides [Array, nil] Per-group threshold overrides. Each override maps a specific combination of grou + # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [Orb::Models::Alert] diff --git a/rbi/orb/models/alert.rbi b/rbi/orb/models/alert.rbi index 185194d1e..e7ffa311a 100644 --- a/rbi/orb/models/alert.rbi +++ b/rbi/orb/models/alert.rbi @@ -79,6 +79,16 @@ module Orb end attr_writer :license_type + # Filters scoping which prices are included in grouped cost alert evaluation. + sig { returns(T.nilable(T::Array[Orb::Alert::PriceFilter])) } + attr_accessor :price_filters + + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a replacement threshold list. Only present for grouped + # cost alerts that have at least one override. + sig { returns(T.nilable(T::Array[Orb::Alert::ThresholdOverride])) } + attr_accessor :threshold_overrides + # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, # usage, or credit balance and trigger webhooks when a threshold is exceeded. # @@ -99,7 +109,10 @@ module Orb balance_alert_status: T.nilable(T::Array[Orb::Alert::BalanceAlertStatus::OrHash]), grouping_keys: T.nilable(T::Array[String]), - license_type: T.nilable(Orb::Alert::LicenseType::OrHash) + license_type: T.nilable(Orb::Alert::LicenseType::OrHash), + price_filters: T.nilable(T::Array[Orb::Alert::PriceFilter::OrHash]), + threshold_overrides: + T.nilable(T::Array[Orb::Alert::ThresholdOverride::OrHash]) ).returns(T.attached_class) end def self.new( @@ -131,7 +144,13 @@ module Orb # grouping enabled. grouping_keys: nil, # Minified license type for alert serialization. - license_type: nil + license_type: nil, + # Filters scoping which prices are included in grouped cost alert evaluation. + price_filters: nil, + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a replacement threshold list. Only present for grouped + # cost alerts that have at least one override. + threshold_overrides: nil ) end @@ -151,7 +170,10 @@ module Orb balance_alert_status: T.nilable(T::Array[Orb::Alert::BalanceAlertStatus]), grouping_keys: T.nilable(T::Array[String]), - license_type: T.nilable(Orb::Alert::LicenseType) + license_type: T.nilable(Orb::Alert::LicenseType), + price_filters: T.nilable(T::Array[Orb::Alert::PriceFilter]), + threshold_overrides: + T.nilable(T::Array[Orb::Alert::ThresholdOverride]) } ) end @@ -307,6 +329,153 @@ module Orb def to_hash end end + + class PriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Alert::PriceFilter, Orb::Internal::AnyHash) + end + + # The property of the price to filter on. + sig { returns(Orb::Alert::PriceFilter::Field::TaggedSymbol) } + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig { returns(Orb::Alert::PriceFilter::Operator::TaggedSymbol) } + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: Orb::Alert::PriceFilter::Field::OrSymbol, + operator: Orb::Alert::PriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: Orb::Alert::PriceFilter::Field::TaggedSymbol, + operator: Orb::Alert::PriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Orb::Alert::PriceFilter::Field) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let(:price_id, Orb::Alert::PriceFilter::Field::TaggedSymbol) + ITEM_ID = + T.let(:item_id, Orb::Alert::PriceFilter::Field::TaggedSymbol) + PRICE_TYPE = + T.let(:price_type, Orb::Alert::PriceFilter::Field::TaggedSymbol) + CURRENCY = + T.let(:currency, Orb::Alert::PriceFilter::Field::TaggedSymbol) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Alert::PriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Alert::PriceFilter::Field::TaggedSymbol] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Orb::Alert::PriceFilter::Operator) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let(:includes, Orb::Alert::PriceFilter::Operator::TaggedSymbol) + EXCLUDES = + T.let(:excludes, Orb::Alert::PriceFilter::Operator::TaggedSymbol) + + sig do + override.returns( + T::Array[Orb::Alert::PriceFilter::Operator::TaggedSymbol] + ) + end + def self.values + end + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Alert::ThresholdOverride, Orb::Internal::AnyHash) + end + + # The values of the grouping keys that identify this group. The list length + # matches the alert's grouping_keys. + sig { returns(T::Array[String]) } + attr_accessor :group_values + + # The thresholds applied to this group. An empty list means the group is silenced. + sig { returns(T::Array[Orb::Threshold]) } + attr_accessor :thresholds + + # A per-group threshold override on a grouped cost alert. + # + # An empty `thresholds` list means the group is silenced (never fires). A + # non-empty list fully replaces the default thresholds for that group. + sig do + params( + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold::OrHash] + ).returns(T.attached_class) + end + def self.new( + # The values of the grouping keys that identify this group. The list length + # matches the alert's grouping_keys. + group_values:, + # The thresholds applied to this group. An empty list means the group is silenced. + thresholds: + ) + end + + sig do + override.returns( + { + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold] + } + ) + end + def to_hash + end + end end end end diff --git a/rbi/orb/models/alert_create_for_subscription_params.rbi b/rbi/orb/models/alert_create_for_subscription_params.rbi index 3bb64bdda..c0047c610 100644 --- a/rbi/orb/models/alert_create_for_subscription_params.rbi +++ b/rbi/orb/models/alert_create_for_subscription_params.rbi @@ -31,11 +31,37 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :metric_id + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + sig do + returns( + T.nilable( + T::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter] + ) + ) + end + attr_accessor :price_filters + # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. sig { returns(T.nilable(String)) } attr_accessor :pricing_unit_id + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + sig do + returns( + T.nilable( + T::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride] + ) + ) + end + attr_accessor :threshold_overrides + sig do params( subscription_id: String, @@ -43,7 +69,19 @@ module Orb type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + price_filters: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::OrHash + ] + ), pricing_unit_id: T.nilable(String), + threshold_overrides: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::ThresholdOverride::OrHash + ] + ), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end @@ -58,9 +96,19 @@ module Orb grouping_keys: nil, # The metric to track usage for. metric_id: nil, + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + price_filters: nil, # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. pricing_unit_id: nil, + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + threshold_overrides: nil, request_options: {} ) end @@ -73,7 +121,17 @@ module Orb type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + price_filters: + T.nilable( + T::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter] + ), pricing_unit_id: T.nilable(String), + threshold_overrides: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::ThresholdOverride + ] + ), request_options: Orb::RequestOptions } ) @@ -110,6 +168,207 @@ module Orb def self.values end end + + class PriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::AlertCreateForSubscriptionParams::PriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::OrSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::OrSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::OrSymbol, + operator: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::OrSymbol, + operator: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::OrSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::AlertCreateForSubscriptionParams::ThresholdOverride, + Orb::Internal::AnyHash + ) + end + + # The values of the grouping keys that identify this group. The list length must + # match the alert's grouping_keys, and values appear in the same order as + # grouping_keys. + sig { returns(T::Array[String]) } + attr_accessor :group_values + + # The thresholds to apply to this group. An empty list silences alerts for this + # group. A non-empty list fully replaces the default thresholds for this group. + sig { returns(T::Array[Orb::Threshold]) } + attr_accessor :thresholds + + # Per-group threshold override on a grouped cost alert. + # + # - An empty `thresholds` list silences alerts for this group (never fires). + # - A non-empty list fully replaces the default thresholds for this group. + sig do + params( + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold::OrHash] + ).returns(T.attached_class) + end + def self.new( + # The values of the grouping keys that identify this group. The list length must + # match the alert's grouping_keys, and values appear in the same order as + # grouping_keys. + group_values:, + # The thresholds to apply to this group. An empty list silences alerts for this + # group. A non-empty list fully replaces the default thresholds for this group. + thresholds: + ) + end + + sig do + override.returns( + { + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold] + } + ) + end + def to_hash + end + end end end end diff --git a/rbi/orb/resources/alerts.rbi b/rbi/orb/resources/alerts.rbi index bd56b8ffd..50d53ebab 100644 --- a/rbi/orb/resources/alerts.rbi +++ b/rbi/orb/resources/alerts.rbi @@ -155,7 +155,19 @@ module Orb type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + price_filters: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::OrHash + ] + ), pricing_unit_id: T.nilable(String), + threshold_overrides: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::ThresholdOverride::OrHash + ] + ), request_options: Orb::RequestOptions::OrHash ).returns(Orb::Alert) end @@ -170,9 +182,19 @@ module Orb grouping_keys: nil, # The metric to track usage for. metric_id: nil, + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + price_filters: nil, # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. pricing_unit_id: nil, + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + threshold_overrides: nil, request_options: {} ) end diff --git a/sig/orb/models/alert.rbs b/sig/orb/models/alert.rbs index 3f5fe7d86..9348529a8 100644 --- a/sig/orb/models/alert.rbs +++ b/sig/orb/models/alert.rbs @@ -14,7 +14,9 @@ module Orb type: Orb::Models::Alert::type_, balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, grouping_keys: ::Array[String]?, - license_type: Orb::Alert::LicenseType? + license_type: Orb::Alert::LicenseType?, + price_filters: ::Array[Orb::Alert::PriceFilter]?, + threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? } class Alert < Orb::Internal::Type::BaseModel @@ -44,6 +46,10 @@ module Orb attr_accessor license_type: Orb::Alert::LicenseType? + attr_accessor price_filters: ::Array[Orb::Alert::PriceFilter]? + + attr_accessor threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? + def initialize: ( id: String, created_at: Time, @@ -57,7 +63,9 @@ module Orb type: Orb::Models::Alert::type_, ?balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, ?grouping_keys: ::Array[String]?, - ?license_type: Orb::Alert::LicenseType? + ?license_type: Orb::Alert::LicenseType?, + ?price_filters: ::Array[Orb::Alert::PriceFilter]?, + ?threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? ) -> void def to_hash: -> { @@ -73,7 +81,9 @@ module Orb type: Orb::Models::Alert::type_, balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, grouping_keys: ::Array[String]?, - license_type: Orb::Alert::LicenseType? + license_type: Orb::Alert::LicenseType?, + price_filters: ::Array[Orb::Alert::PriceFilter]?, + threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? } type metric = { id: String } @@ -160,6 +170,78 @@ module Orb def to_hash: -> { id: String } end + + type price_filter = + { + field: Orb::Models::Alert::PriceFilter::field, + operator: Orb::Models::Alert::PriceFilter::operator, + values: ::Array[String] + } + + class PriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Alert::PriceFilter::field + + attr_accessor operator: Orb::Models::Alert::PriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Alert::PriceFilter::field, + operator: Orb::Models::Alert::PriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Alert::PriceFilter::field, + operator: Orb::Models::Alert::PriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Alert::PriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Alert::PriceFilter::operator] + end + end + + type threshold_override = + { group_values: ::Array[String], thresholds: ::Array[Orb::Threshold] } + + class ThresholdOverride < Orb::Internal::Type::BaseModel + attr_accessor group_values: ::Array[String] + + attr_accessor thresholds: ::Array[Orb::Threshold] + + def initialize: ( + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + ) -> void + + def to_hash: -> { + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + } + end end end end diff --git a/sig/orb/models/alert_create_for_subscription_params.rbs b/sig/orb/models/alert_create_for_subscription_params.rbs index cbd8c259b..512d4c966 100644 --- a/sig/orb/models/alert_create_for_subscription_params.rbs +++ b/sig/orb/models/alert_create_for_subscription_params.rbs @@ -7,7 +7,9 @@ module Orb type: Orb::Models::AlertCreateForSubscriptionParams::type_, grouping_keys: ::Array[String]?, metric_id: String?, - pricing_unit_id: String? + price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, + pricing_unit_id: String?, + threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]? } & Orb::Internal::Type::request_parameters @@ -25,15 +27,21 @@ module Orb attr_accessor metric_id: String? + attr_accessor price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]? + attr_accessor pricing_unit_id: String? + attr_accessor threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]? + def initialize: ( subscription_id: String, thresholds: ::Array[Orb::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, ?grouping_keys: ::Array[String]?, ?metric_id: String?, + ?price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, ?pricing_unit_id: String?, + ?threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?, ?request_options: Orb::request_opts ) -> void @@ -43,7 +51,9 @@ module Orb type: Orb::Models::AlertCreateForSubscriptionParams::type_, grouping_keys: ::Array[String]?, metric_id: String?, + price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, pricing_unit_id: String?, + threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?, request_options: Orb::RequestOptions } @@ -57,6 +67,78 @@ module Orb def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::type_] end + + type price_filter = + { + field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field, + operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator, + values: ::Array[String] + } + + class PriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field + + attr_accessor operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field, + operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field, + operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator] + end + end + + type threshold_override = + { group_values: ::Array[String], thresholds: ::Array[Orb::Threshold] } + + class ThresholdOverride < Orb::Internal::Type::BaseModel + attr_accessor group_values: ::Array[String] + + attr_accessor thresholds: ::Array[Orb::Threshold] + + def initialize: ( + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + ) -> void + + def to_hash: -> { + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + } + end end end end diff --git a/sig/orb/resources/alerts.rbs b/sig/orb/resources/alerts.rbs index 7f1000be5..4551c4f06 100644 --- a/sig/orb/resources/alerts.rbs +++ b/sig/orb/resources/alerts.rbs @@ -47,7 +47,9 @@ module Orb type: Orb::Models::AlertCreateForSubscriptionParams::type_, ?grouping_keys: ::Array[String]?, ?metric_id: String?, + ?price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, ?pricing_unit_id: String?, + ?threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?, ?request_options: Orb::request_opts ) -> Orb::Alert diff --git a/test/orb/resources/alerts_test.rb b/test/orb/resources/alerts_test.rb index f473cb4b1..45b55da29 100644 --- a/test/orb/resources/alerts_test.rb +++ b/test/orb/resources/alerts_test.rb @@ -24,7 +24,9 @@ def test_retrieve type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -50,7 +52,9 @@ def test_update_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -85,7 +89,9 @@ def test_list type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -112,7 +118,9 @@ def test_create_for_customer_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -143,7 +151,9 @@ def test_create_for_external_customer_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -170,7 +180,9 @@ def test_create_for_subscription_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -196,7 +208,9 @@ def test_disable type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -222,7 +236,9 @@ def test_enable type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end From e9b02677072c1d58e05b9a6d6b6f9cbc94637e54 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 19:08:26 +0000 Subject: [PATCH 13/22] ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/publish-gem.yml | 4 ++-- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3161eb8e4..9ff150c01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,9 @@ jobs: github.repository == 'stainless-sdks/orb-ruby' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -39,7 +39,7 @@ jobs: github.repository == 'stainless-sdks/orb-ruby' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -60,9 +60,9 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -76,9 +76,9 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/orb-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 85ed01fb8..6691ae1cb 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 70087b2b7..0cae5f9b7 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'orbcorp/orb-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | From 2a2a137ad0d25853629c6de454472078d10a7cb3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 23:15:03 +0000 Subject: [PATCH 14/22] feat(api): api update --- .stats.yml | 4 +-- .../models/plans/migration_cancel_response.rb | 26 ++++++++++++++++--- .../models/plans/migration_list_response.rb | 26 ++++++++++++++++--- .../plans/migration_retrieve_response.rb | 26 ++++++++++++++++--- .../plans/migration_cancel_response.rbi | 23 +++++++++++++++- .../models/plans/migration_list_response.rbi | 23 +++++++++++++++- .../plans/migration_retrieve_response.rbi | 23 +++++++++++++++- 7 files changed, 134 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index 345cd65bf..48e099eba 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-7f97a69f22372b818e8d24a72f6020bcf2f0c6d6b3ad07abb8395c87ec4a72ee.yml -openapi_spec_hash: a6261e730c54d08ad36f1b946e663fc3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-eeb1a619e163d81d19ba1783f731a4b159966371a2c2200d29334a021a90df23.yml +openapi_spec_hash: 611155ef9e528c74675d68a70b86bf03 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/plans/migration_cancel_response.rb b/lib/orb/models/plans/migration_cancel_response.rb index 30b66ddd1..da50be4be 100644 --- a/lib/orb/models/plans/migration_cancel_response.rb +++ b/lib/orb/models/plans/migration_cancel_response.rb @@ -6,11 +6,14 @@ module Plans # @see Orb::Resources::Plans::Migrations#cancel class MigrationCancelResponse < Orb::Internal::Type::BaseModel # @!attribute id + # Unique identifier for this plan version change. # # @return [String] required :id, String # @!attribute effective_time + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. # # @return [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] required :effective_time, @@ -18,21 +21,33 @@ class MigrationCancelResponse < Orb::Internal::Type::BaseModel nil?: true # @!attribute plan_id + # The ID of the plan being migrated. # # @return [String] required :plan_id, String # @!attribute status + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. # # @return [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status] required :status, enum: -> { Orb::Models::Plans::MigrationCancelResponse::Status } # @!method initialize(id:, effective_time:, plan_id:, status:) - # @param id [String] - # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] - # @param plan_id [String] - # @param status [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status] + # Some parameter documentations has been truncated, see + # {Orb::Models::Plans::MigrationCancelResponse} for more details. + # + # @param id [String] Unique identifier for this plan version change. + # + # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, or 'end_of_term' w + # + # @param plan_id [String] The ID of the plan being migrated. + # + # @param status [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + # # @see Orb::Models::Plans::MigrationCancelResponse#effective_time module EffectiveTime extend Orb::Internal::Type::Union @@ -57,6 +72,9 @@ module EffectiveTime # @!endgroup end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + # # @see Orb::Models::Plans::MigrationCancelResponse#status module Status extend Orb::Internal::Type::Enum diff --git a/lib/orb/models/plans/migration_list_response.rb b/lib/orb/models/plans/migration_list_response.rb index e124171a6..2690382ff 100644 --- a/lib/orb/models/plans/migration_list_response.rb +++ b/lib/orb/models/plans/migration_list_response.rb @@ -6,11 +6,14 @@ module Plans # @see Orb::Resources::Plans::Migrations#list class MigrationListResponse < Orb::Internal::Type::BaseModel # @!attribute id + # Unique identifier for this plan version change. # # @return [String] required :id, String # @!attribute effective_time + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. # # @return [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] required :effective_time, @@ -18,21 +21,33 @@ class MigrationListResponse < Orb::Internal::Type::BaseModel nil?: true # @!attribute plan_id + # The ID of the plan being migrated. # # @return [String] required :plan_id, String # @!attribute status + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. # # @return [Symbol, Orb::Models::Plans::MigrationListResponse::Status] required :status, enum: -> { Orb::Models::Plans::MigrationListResponse::Status } # @!method initialize(id:, effective_time:, plan_id:, status:) - # @param id [String] - # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] - # @param plan_id [String] - # @param status [Symbol, Orb::Models::Plans::MigrationListResponse::Status] + # Some parameter documentations has been truncated, see + # {Orb::Models::Plans::MigrationListResponse} for more details. + # + # @param id [String] Unique identifier for this plan version change. + # + # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, or 'end_of_term' w + # + # @param plan_id [String] The ID of the plan being migrated. + # + # @param status [Symbol, Orb::Models::Plans::MigrationListResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + # # @see Orb::Models::Plans::MigrationListResponse#effective_time module EffectiveTime extend Orb::Internal::Type::Union @@ -57,6 +72,9 @@ module EffectiveTime # @!endgroup end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + # # @see Orb::Models::Plans::MigrationListResponse#status module Status extend Orb::Internal::Type::Enum diff --git a/lib/orb/models/plans/migration_retrieve_response.rb b/lib/orb/models/plans/migration_retrieve_response.rb index 1cbd07da6..e5a123c22 100644 --- a/lib/orb/models/plans/migration_retrieve_response.rb +++ b/lib/orb/models/plans/migration_retrieve_response.rb @@ -6,11 +6,14 @@ module Plans # @see Orb::Resources::Plans::Migrations#retrieve class MigrationRetrieveResponse < Orb::Internal::Type::BaseModel # @!attribute id + # Unique identifier for this plan version change. # # @return [String] required :id, String # @!attribute effective_time + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. # # @return [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] required :effective_time, @@ -18,21 +21,33 @@ class MigrationRetrieveResponse < Orb::Internal::Type::BaseModel nil?: true # @!attribute plan_id + # The ID of the plan being migrated. # # @return [String] required :plan_id, String # @!attribute status + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. # # @return [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] required :status, enum: -> { Orb::Models::Plans::MigrationRetrieveResponse::Status } # @!method initialize(id:, effective_time:, plan_id:, status:) - # @param id [String] - # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] - # @param plan_id [String] - # @param status [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] + # Some parameter documentations has been truncated, see + # {Orb::Models::Plans::MigrationRetrieveResponse} for more details. + # + # @param id [String] Unique identifier for this plan version change. + # + # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, or 'end_of_term' w + # + # @param plan_id [String] The ID of the plan being migrated. + # + # @param status [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + # # @see Orb::Models::Plans::MigrationRetrieveResponse#effective_time module EffectiveTime extend Orb::Internal::Type::Union @@ -57,6 +72,9 @@ module EffectiveTime # @!endgroup end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + # # @see Orb::Models::Plans::MigrationRetrieveResponse#status module Status extend Orb::Internal::Type::Enum diff --git a/rbi/orb/models/plans/migration_cancel_response.rbi b/rbi/orb/models/plans/migration_cancel_response.rbi index 055f21601..af7b7b3a7 100644 --- a/rbi/orb/models/plans/migration_cancel_response.rbi +++ b/rbi/orb/models/plans/migration_cancel_response.rbi @@ -12,9 +12,12 @@ module Orb ) end + # Unique identifier for this plan version change. sig { returns(String) } attr_accessor :id + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. sig do returns( T.nilable( @@ -24,9 +27,12 @@ module Orb end attr_accessor :effective_time + # The ID of the plan being migrated. sig { returns(String) } attr_accessor :plan_id + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. sig do returns( Orb::Models::Plans::MigrationCancelResponse::Status::TaggedSymbol @@ -50,7 +56,18 @@ module Orb Orb::Models::Plans::MigrationCancelResponse::Status::OrSymbol ).returns(T.attached_class) end - def self.new(id:, effective_time:, plan_id:, status:) + def self.new( + # Unique identifier for this plan version change. + id:, + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + effective_time:, + # The ID of the plan being migrated. + plan_id:, + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + status: + ) end sig do @@ -70,6 +87,8 @@ module Orb def to_hash end + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. module EffectiveTime extend Orb::Internal::Type::Union @@ -108,6 +127,8 @@ module Orb ) end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. module Status extend Orb::Internal::Type::Enum diff --git a/rbi/orb/models/plans/migration_list_response.rbi b/rbi/orb/models/plans/migration_list_response.rbi index 03fa10aaa..a62cd1544 100644 --- a/rbi/orb/models/plans/migration_list_response.rbi +++ b/rbi/orb/models/plans/migration_list_response.rbi @@ -12,9 +12,12 @@ module Orb ) end + # Unique identifier for this plan version change. sig { returns(String) } attr_accessor :id + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. sig do returns( T.nilable( @@ -24,9 +27,12 @@ module Orb end attr_accessor :effective_time + # The ID of the plan being migrated. sig { returns(String) } attr_accessor :plan_id + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. sig do returns( Orb::Models::Plans::MigrationListResponse::Status::TaggedSymbol @@ -49,7 +55,18 @@ module Orb status: Orb::Models::Plans::MigrationListResponse::Status::OrSymbol ).returns(T.attached_class) end - def self.new(id:, effective_time:, plan_id:, status:) + def self.new( + # Unique identifier for this plan version change. + id:, + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + effective_time:, + # The ID of the plan being migrated. + plan_id:, + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + status: + ) end sig do @@ -69,6 +86,8 @@ module Orb def to_hash end + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. module EffectiveTime extend Orb::Internal::Type::Union @@ -107,6 +126,8 @@ module Orb ) end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. module Status extend Orb::Internal::Type::Enum diff --git a/rbi/orb/models/plans/migration_retrieve_response.rbi b/rbi/orb/models/plans/migration_retrieve_response.rbi index 738368d13..1b6d4bd61 100644 --- a/rbi/orb/models/plans/migration_retrieve_response.rbi +++ b/rbi/orb/models/plans/migration_retrieve_response.rbi @@ -12,9 +12,12 @@ module Orb ) end + # Unique identifier for this plan version change. sig { returns(String) } attr_accessor :id + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. sig do returns( T.nilable( @@ -24,9 +27,12 @@ module Orb end attr_accessor :effective_time + # The ID of the plan being migrated. sig { returns(String) } attr_accessor :plan_id + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. sig do returns( Orb::Models::Plans::MigrationRetrieveResponse::Status::TaggedSymbol @@ -50,7 +56,18 @@ module Orb Orb::Models::Plans::MigrationRetrieveResponse::Status::OrSymbol ).returns(T.attached_class) end - def self.new(id:, effective_time:, plan_id:, status:) + def self.new( + # Unique identifier for this plan version change. + id:, + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + effective_time:, + # The ID of the plan being migrated. + plan_id:, + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + status: + ) end sig do @@ -70,6 +87,8 @@ module Orb def to_hash end + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. module EffectiveTime extend Orb::Internal::Type::Union @@ -108,6 +127,8 @@ module Orb ) end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. module Status extend Orb::Internal::Type::Enum From 8c2ddbb632b0fa247e4819c27d7f4e5078e90bff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 15:21:54 +0000 Subject: [PATCH 15/22] fix(client): elide content type header on requests without body --- lib/orb/internal/transport/base_client.rb | 2 ++ test/orb/client_test.rb | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/orb/internal/transport/base_client.rb b/lib/orb/internal/transport/base_client.rb index c93705860..de4945d6f 100644 --- a/lib/orb/internal/transport/base_client.rb +++ b/lib/orb/internal/transport/base_client.rb @@ -306,6 +306,8 @@ def initialize( Orb::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact) end + headers.delete("content-type") if body.nil? + url = Orb::Internal::Util.join_parsed_uri(@base_url_components, {**req, path: path, query: query}) headers, encoded = Orb::Internal::Util.encode_content(headers, body) { diff --git a/test/orb/client_test.rb b/test/orb/client_test.rb index ecdbb3063..f153cab98 100644 --- a/test/orb/client_test.rb +++ b/test/orb/client_test.rb @@ -208,8 +208,8 @@ def test_client_redirect_307 assert_equal(recorded.method, _1.method) assert_equal(recorded.body, _1.body) assert_equal( - recorded.headers.transform_keys(&:downcase).fetch("content-type"), - _1.headers.transform_keys(&:downcase).fetch("content-type") + recorded.headers.transform_keys(&:downcase)["content-type"], + _1.headers.transform_keys(&:downcase)["content-type"] ) end end @@ -344,8 +344,9 @@ def test_default_headers orb.customers.create(email: "dev@stainless.com", name: "x") assert_requested(:any, /./) do |req| - headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type") - headers.each { refute_empty(_1) } + headers = req.headers.transform_keys(&:downcase) + expected = req.body.nil? ? ["accept"] : %w[accept content-type] + headers.fetch_values(*expected).each { refute_empty(_1) } end end end From ebd342e9f511341c93ab4e57f7b92420d0677aa2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 17:15:45 +0000 Subject: [PATCH 16/22] feat(api): api update --- .stats.yml | 4 +- ...rnal_plan_id_create_plan_version_params.rb | 534 ++- .../models/beta_create_plan_version_params.rb | 532 ++- .../models/changed_subscription_resources.rb | 4 +- lib/orb/models/invoice.rb | 4 +- .../models/invoice_fetch_upcoming_response.rb | 4 +- .../invoice_line_item_create_response.rb | 4 +- lib/orb/models/per_price_cost.rb | 4 +- lib/orb/models/plan.rb | 4 +- lib/orb/models/plan_create_params.rb | 265 +- lib/orb/models/plan_version.rb | 4 +- lib/orb/models/price.rb | 434 ++- lib/orb/models/price_create_params.rb | 248 +- .../models/price_evaluate_multiple_params.rb | 257 +- .../price_evaluate_preview_events_params.rb | 257 +- lib/orb/models/price_interval.rb | 4 +- lib/orb/models/subscription_create_params.rb | 531 ++- .../subscription_price_intervals_params.rb | 256 +- ...ubscription_schedule_plan_change_params.rb | 534 ++- lib/orb/resources/prices.rb | 10 +- lib/orb/resources/prices/external_price_id.rb | 4 +- ...nal_plan_id_create_plan_version_params.rbi | 3342 +++++++++++------ .../beta_create_plan_version_params.rbi | 3186 ++++++++++------ .../models/changed_subscription_resources.rbi | 1 + rbi/orb/models/invoice.rbi | 1 + .../invoice_fetch_upcoming_response.rbi | 1 + .../invoice_line_item_create_response.rbi | 1 + rbi/orb/models/per_price_cost.rbi | 1 + rbi/orb/models/plan.rbi | 1 + rbi/orb/models/plan_create_params.rbi | 419 +++ rbi/orb/models/plan_version.rbi | 1 + rbi/orb/models/price.rbi | 727 ++++ rbi/orb/models/price_create_params.rbi | 407 ++ .../models/price_evaluate_multiple_params.rbi | 407 ++ .../price_evaluate_preview_events_params.rbi | 407 ++ rbi/orb/models/price_interval.rbi | 1 + rbi/orb/models/subscription_create_params.rbi | 2954 +++++++++------ .../subscription_price_intervals_params.rbi | 407 ++ ...bscription_schedule_plan_change_params.rbi | 2970 +++++++++------ rbi/orb/resources/prices.rbi | 1 + ...nal_plan_id_create_plan_version_params.rbs | 350 ++ .../beta_create_plan_version_params.rbs | 350 ++ sig/orb/models/plan_create_params.rbs | 175 + sig/orb/models/price.rbs | 319 ++ sig/orb/models/price_create_params.rbs | 165 + .../models/price_evaluate_multiple_params.rbs | 170 + .../price_evaluate_preview_events_params.rbs | 170 + sig/orb/models/subscription_create_params.rbs | 350 ++ .../subscription_price_intervals_params.rbs | 170 + ...bscription_schedule_plan_change_params.rbs | 350 ++ .../prices/external_price_id_test.rb | 66 + test/orb/resources/prices_test.rb | 132 + 52 files changed, 17285 insertions(+), 4615 deletions(-) diff --git a/.stats.yml b/.stats.yml index 48e099eba..2d7bf679f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-eeb1a619e163d81d19ba1783f731a4b159966371a2c2200d29334a021a90df23.yml -openapi_spec_hash: 611155ef9e528c74675d68a70b86bf03 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-6ba9b1b34b3995136fce37ca4bfa7ec253213680ef1d49d74960f55d22fde5dc.yml +openapi_spec_hash: 56d69d79bef9db11216cf8764106040f config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb index dbe3f141c..cac56e3e1 100644 --- a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +++ b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb @@ -172,7 +172,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price }, nil?: true @@ -184,7 +184,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -505,6 +505,9 @@ module Price variant :daily_credit_allowance, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } + variant :metered_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent } @@ -1767,6 +1770,264 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2209,7 +2470,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] end end @@ -2333,7 +2594,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price }, nil?: true @@ -2347,7 +2608,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to replace this price from. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -2668,6 +2929,9 @@ module Price variant :daily_credit_allowance, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance } + variant :metered_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent } @@ -3930,6 +4194,264 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4372,7 +4894,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/beta_create_plan_version_params.rb b/lib/orb/models/beta_create_plan_version_params.rb index c752f807f..fe7526cc8 100644 --- a/lib/orb/models/beta_create_plan_version_params.rb +++ b/lib/orb/models/beta_create_plan_version_params.rb @@ -158,7 +158,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -168,7 +168,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -484,6 +484,8 @@ module Price variant :daily_credit_allowance, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } @@ -1733,6 +1735,264 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2172,7 +2432,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] end end @@ -2293,7 +2553,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -2305,7 +2565,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to replace this price from. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -2621,6 +2881,8 @@ module Price variant :daily_credit_allowance, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent } @@ -3874,6 +4136,264 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4315,7 +4835,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/changed_subscription_resources.rb b/lib/orb/models/changed_subscription_resources.rb index 8474ef9f9..75a70c0a4 100644 --- a/lib/orb/models/changed_subscription_resources.rb +++ b/lib/orb/models/changed_subscription_resources.rb @@ -852,7 +852,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -919,7 +919,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index 0b92ba559..fe107ec60 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -806,7 +806,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -871,7 +871,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 730479c08..6bb4890ff 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -807,7 +807,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -873,7 +873,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_line_item_create_response.rb b/lib/orb/models/invoice_line_item_create_response.rb index 5cd740f1c..c521c5073 100644 --- a/lib/orb/models/invoice_line_item_create_response.rb +++ b/lib/orb/models/invoice_line_item_create_response.rb @@ -83,7 +83,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -149,7 +149,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/per_price_cost.rb b/lib/orb/models/per_price_cost.rb index 4f092d866..bf92f1333 100644 --- a/lib/orb/models/per_price_cost.rb +++ b/lib/orb/models/per_price_cost.rb @@ -6,7 +6,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel # @!attribute price # The price object # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute price_id @@ -34,7 +34,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel optional :quantity, Float, nil?: true # @!method initialize(price:, price_id:, subtotal:, total:, quantity: nil) - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object # # @param price_id [String] The price the cost is associated with # diff --git a/lib/orb/models/plan.rb b/lib/orb/models/plan.rb index b0e186b7b..82ce93e5f 100644 --- a/lib/orb/models/plan.rb +++ b/lib/orb/models/plan.rb @@ -138,7 +138,7 @@ class Plan < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute product @@ -208,7 +208,7 @@ class Plan < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param product [Orb::Models::Plan::Product] # diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index 53220e806..8f182bc32 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -136,7 +136,7 @@ class Price < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -146,7 +146,7 @@ class Price < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::PlanCreateParams::Price#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -455,6 +455,8 @@ module Price variant :daily_credit_allowance, -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } variant :percent, -> { Orb::PlanCreateParams::Price::Price::Percent } @@ -1692,6 +1694,263 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PlanCreateParams::Price::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance} for more + # details. + # + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2124,7 +2383,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] end end diff --git a/lib/orb/models/plan_version.rb b/lib/orb/models/plan_version.rb index 56c9d97fb..bbc5a7315 100644 --- a/lib/orb/models/plan_version.rb +++ b/lib/orb/models/plan_version.rb @@ -25,7 +25,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute version @@ -46,7 +46,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param version [Integer] diff --git a/lib/orb/models/price.rb b/lib/orb/models/price.rb index cefffb2fe..c2816b1ed 100644 --- a/lib/orb/models/price.rb +++ b/lib/orb/models/price.rb @@ -75,6 +75,8 @@ module Price variant :daily_credit_allowance, -> { Orb::Price::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::Price::MinimumComposite } variant :percent, -> { Orb::Price::Percent } @@ -11922,6 +11924,436 @@ class LicenseType < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::BillingMode] + required :billing_mode, enum: -> { Orb::Price::MeteredAllowance::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::Price::MeteredAllowance::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter] }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::MeteredAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # 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`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, -> { Orb::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::PriceType] + required :price_type, enum: -> { Orb::Price::MeteredAllowance::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # 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. + # + # @return [Orb::Models::Price::MeteredAllowance::LicenseType, nil] + optional :license_type, -> { Orb::Price::MeteredAllowance::LicenseType }, nil?: true + + # @!method 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:, metered_allowance_config:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MeteredAllowance} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::MeteredAllowance::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::MeteredAllowance::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param metered_allowance_config [Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::MeteredAllowance::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::MeteredAllowance::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # @see Orb::Models::Price::MeteredAllowance#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::MeteredAllowance::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::MeteredAllowance::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::MeteredAllowance::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::MeteredAllowance::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig} for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + + # @see Orb::Models::Price::MeteredAllowance#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MeteredAllowance#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MeteredAllowance::LicenseType} for more details. + # + # 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. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + class MinimumComposite < Orb::Internal::Type::BaseModel # @!attribute id # @@ -13099,7 +13531,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] + # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index f4f599fd9..524c5d49f 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -10,11 +10,11 @@ class PriceCreateParams < Orb::Internal::Type::BaseModel # @!attribute body # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] required :body, union: -> { Orb::PriceCreateParams::Body } # @!method initialize(body:, request_options: {}) - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -82,6 +82,8 @@ module Body variant :daily_credit_allowance, -> { Orb::PriceCreateParams::Body::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::PriceCreateParams::Body::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceCreateParams::Body::Percent } @@ -1025,6 +1027,246 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PriceCreateParams::Body::MeteredAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MeteredAllowance} for more details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceCreateParams::Body::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1429,7 +1671,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_multiple_params.rb b/lib/orb/models/price_evaluate_multiple_params.rb index 07e8bfc66..477176b70 100644 --- a/lib/orb/models/price_evaluate_multiple_params.rb +++ b/lib/orb/models/price_evaluate_multiple_params.rb @@ -86,7 +86,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price }, nil?: true # @!attribute price_id @@ -107,7 +107,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -181,6 +181,9 @@ module Price variant :daily_credit_allowance, -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance } + variant :metered_allowance, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent } @@ -1154,6 +1157,254 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1575,7 +1826,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_preview_events_params.rb b/lib/orb/models/price_evaluate_preview_events_params.rb index 7d77832c8..6a5f2500a 100644 --- a/lib/orb/models/price_evaluate_preview_events_params.rb +++ b/lib/orb/models/price_evaluate_preview_events_params.rb @@ -144,7 +144,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price @@ -170,7 +170,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -244,6 +244,9 @@ module Price variant :daily_credit_allowance, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance } + variant :metered_allowance, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent } @@ -1225,6 +1228,254 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1647,7 +1898,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_interval.rb b/lib/orb/models/price_interval.rb index e046bf3f8..de7ea9bcf 100644 --- a/lib/orb/models/price_interval.rb +++ b/lib/orb/models/price_interval.rb @@ -72,7 +72,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute start_date @@ -122,7 +122,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # # @param fixed_fee_quantity_transitions [Array, nil] The fixed fee quantity transitions for this price interval. This is only relevan # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f # diff --git a/lib/orb/models/subscription_create_params.rb b/lib/orb/models/subscription_create_params.rb index f1fee1158..e285b2f22 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -449,7 +449,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionCreateParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -486,7 +486,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -562,6 +562,8 @@ module Price variant :daily_credit_allowance, -> { Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionCreateParams::AddPrice::Price::Percent } @@ -1810,6 +1812,263 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance} for + # more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2249,7 +2508,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] end end @@ -2400,7 +2659,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price }, nil?: true # @!attribute price_id @@ -2429,7 +2688,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. @@ -2504,6 +2763,8 @@ module Price variant :daily_credit_allowance, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent } @@ -3753,6 +4014,264 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4193,7 +4712,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 89dff721d..546eddbfe 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -163,7 +163,7 @@ class Add < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price }, nil?: true # @!attribute price_id @@ -209,7 +209,7 @@ class Add < Orb::Internal::Type::BaseModel # # @param minimum_amount [Float, nil] The minimum amount that will be billed for this price interval for a given billi # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -412,6 +412,8 @@ module Price variant :daily_credit_allowance, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance } + variant :metered_allowance, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent } @@ -1385,6 +1387,254 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1804,7 +2054,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] end end diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index 6cbacb02d..05c2c22ca 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -421,7 +421,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -458,7 +458,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -536,6 +536,9 @@ module Price variant :daily_credit_allowance, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance } + variant :metered_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent } @@ -1789,6 +1792,264 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2231,7 +2492,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] end end @@ -2385,7 +2646,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price @@ -2419,7 +2680,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. @@ -2495,6 +2756,9 @@ module Price variant :daily_credit_allowance, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance } + variant :metered_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent } @@ -3756,6 +4020,264 @@ class MatrixValue < Orb::Internal::Type::BaseModel end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4198,7 +4720,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/resources/prices.rb b/lib/orb/resources/prices.rb index ef7c712a0..fe01296d4 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -39,11 +39,11 @@ class Prices # # @overload create(body:, request_options: {}) # - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceCreateParams def create(params) @@ -72,7 +72,7 @@ def create(params) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceUpdateParams def update(price_id, params = {}) @@ -100,7 +100,7 @@ def update(price_id, params = {}) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Internal::Page] + # @return [Orb::Internal::Page] # # @see Orb::Models::PriceListParams def list(params = {}) @@ -293,7 +293,7 @@ def evaluate_preview_events(params) # @param price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceFetchParams def fetch(price_id, params = {}) diff --git a/lib/orb/resources/prices/external_price_id.rb b/lib/orb/resources/prices/external_price_id.rb index 10a6cd936..7e0c93fee 100644 --- a/lib/orb/resources/prices/external_price_id.rb +++ b/lib/orb/resources/prices/external_price_id.rb @@ -29,7 +29,7 @@ class ExternalPriceID # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDUpdateParams def update(external_price_id, params = {}) @@ -52,7 +52,7 @@ def update(external_price_id, params = {}) # @param external_price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDFetchParams def fetch(external_price_id, params = {}) diff --git a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi index ea9a836cb..ea4d7bc61 100644 --- a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +++ b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi @@ -384,6 +384,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -433,6 +434,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::OrHash @@ -493,6 +495,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -964,6 +967,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -3081,11 +3085,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3093,7 +3097,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3102,29 +3106,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3227,11 +3231,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3263,10 +3267,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3305,7 +3309,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3313,12 +3317,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3356,7 +3360,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3364,38 +3368,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3403,38 +3407,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3442,27 +3512,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3475,6 +3529,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3576,11 +3646,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3610,12 +3680,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3654,7 +3724,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3662,12 +3732,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3705,7 +3775,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3713,38 +3783,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3752,288 +3822,637 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # Configuration for event_output pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + sig do + params( + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void end + attr_writer :dimensional_price_configuration - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice - ) + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id + + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id + + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + price_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the price to remove from the plan. + price_id:, + # The phase to remove this price from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the plan. + adjustment:, + # The id of the adjustment on the plan to replace in the plan. + replaces_adjustment_id:, + # The phase to replace this adjustment from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the plan. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The allocation price to add to the plan. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # The license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ) ) end attr_reader :license_allocation_price @@ -4086,6 +4505,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -4136,575 +4556,1038 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash ) ) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the plan. - replaces_price_id:, - # The allocation price to add to the plan. - allocation_price: nil, - # The license allocation price to add to the plan. - license_allocation_price: nil, - # The phase to replace this price from. - plan_phase_order: nil, - # New plan price request body params. - price: nil - ) - end + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the plan. + replaces_price_id:, + # The allocation price to add to the plan. + allocation_price: nil, + # The license allocation price to add to the plan. + license_allocation_price: nil, + # The phase to replace this price from. + plan_phase_order: nil, + # New plan price request body params. + price: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ), + plan_phase_order: T.nilable(Integer), + price: + T.nilable( + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + ) + } + ) + end + def to_hash + end + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - license_allocation_price: - T.nilable( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice - ), - plan_phase_order: T.nilable(Integer), - price: + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: T.nilable( T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) - ) - } + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil ) - end - def to_hash - end - - class LicenseAllocationPrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, - Orb::Internal::AnyHash - ) - end + end - # The cadence to bill for this price on. sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + override.returns( + { + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } ) end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ] - ) + def to_hash end - attr_accessor :license_allocations - # The pricing model type - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol - ) - end - attr_accessor :model_type + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # The name of the price. - sig { returns(String) } - attr_accessor :name + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash + ) + end - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, + # When True, overage beyond the allocation is written off. + write_off_overage: nil + ) + end - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) + sig do + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } ) - ) + end + def to_hash + end end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + sig do + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # The license allocation price to add to the plan. - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash - ], - model_type: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( # The cadence to bill for this price on. - cadence:, + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + sig { returns(String) } + attr_accessor :item_id + # The pricing model type - model_type:, + sig { returns(Symbol) } + attr_accessor :model_type + # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, + sig { returns(String) } + attr_accessor :name + # The id of the billable metric for the price. Only needed if the price is # usage-based. - billable_metric_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - billed_in_advance: nil, + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + # For custom cadence: specifies the duration of the billing period in days or # months. - billing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - currency: nil, + sig { returns(T.nilable(String)) } + attr_accessor :currency + # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. - external_price_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + # If the Price represents a fixed cost, this represents the quantity of units # applied. - fixed_price_quantity: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + # The property used to group this price on an invoice - invoice_grouping_key: nil, + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + # The ID of the license type to associate with this price. - license_type_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - metadata: nil, + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - reference_id: nil - ) - end + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - sig do - override.returns( - { + sig do + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ], - model_type: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) - end - def to_hash - end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + sig do + override.returns( + { + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + attr_accessor :filters - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ] + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: ) - end - def self.values - end - end + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, - Orb::Internal::AnyHash + sig do + override.returns( + { + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end + def to_hash + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Configuration for a single property filter + sig do + params( + property_key: String, + property_value: String + ).returns(T.attached_class) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil ) + end + + sig do + override.returns( + { + unit_amount: String, + tier_lower_bound: T.nilable(String) + } + ) + end + def to_hash + end end - OrSymbol = T.type_alias { T.any(Symbol, String) } + end - UNIT = - T.let( - :unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ) + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ] - ) - end - def self.values - end - end - end + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4721,6 +5604,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4821,12 +5720,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4854,14 +5753,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4900,20 +5799,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4943,52 +5842,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -4996,13 +5936,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -5010,153 +5946,54 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do params( - unit_amount: String, - tier_lower_bound: T.nilable(String) + tier_lower_bound: String, + unit_amount: String ).returns(T.attached_class) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -5164,11 +6001,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -5181,22 +6034,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -5298,11 +6135,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -5332,12 +6169,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -5376,7 +6213,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -5384,12 +6221,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -5427,7 +6264,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5435,38 +6272,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -5474,103 +6311,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge - # Configuration for tiered_with_proration pricing + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -5578,26 +6384,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5712,9 +6518,9 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5746,8 +6552,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5790,7 +6596,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -5798,9 +6604,9 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -5841,7 +6647,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5849,38 +6655,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -5888,59 +6694,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -5949,11 +6755,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -5961,26 +6767,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -6095,9 +6901,9 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -6129,8 +6935,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -6173,7 +6979,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -6181,9 +6987,9 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -6224,7 +7030,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -6232,38 +7038,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -6271,72 +7077,144 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The event property used to group usage before applying allocations + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :event_day_property - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -6344,30 +7222,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :metered_allowance_config sig do params( - daily_credit_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -6478,10 +7356,10 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -6512,10 +7390,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -6556,7 +7434,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :metered_allowance ) end @@ -6564,10 +7442,10 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -6607,7 +7485,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -6615,38 +7493,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -6654,136 +7532,96 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :allowance_grouping_value - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :default_unit_amount + attr_accessor :consumption_grouping_value - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :unit_amount - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name - # Configuration for daily_credit_allowance pricing + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end diff --git a/rbi/orb/models/beta_create_plan_version_params.rbi b/rbi/orb/models/beta_create_plan_version_params.rbi index 340933fc4..a684dceb4 100644 --- a/rbi/orb/models/beta_create_plan_version_params.rbi +++ b/rbi/orb/models/beta_create_plan_version_params.rbi @@ -336,6 +336,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -385,6 +386,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::OrHash @@ -445,6 +447,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -916,6 +919,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -3028,11 +3032,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3040,7 +3044,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3049,29 +3053,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3174,11 +3178,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3210,10 +3214,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3252,7 +3256,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3260,12 +3264,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3303,7 +3307,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3311,38 +3315,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3350,38 +3354,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3389,27 +3459,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3422,6 +3476,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3523,11 +3593,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3557,12 +3627,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3601,7 +3671,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3609,12 +3679,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3652,7 +3722,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3660,38 +3730,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3699,288 +3769,637 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # Configuration for event_output pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + sig do + params( + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void end + attr_writer :dimensional_price_configuration - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice - ) + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id + + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id + + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + price_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the price to remove from the plan. + price_id:, + # The phase to remove this price from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the plan. + adjustment:, + # The id of the adjustment on the plan to replace in the plan. + replaces_adjustment_id:, + # The phase to replace this adjustment from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the plan. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The allocation price to add to the plan. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # The license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ) ) end attr_reader :license_allocation_price @@ -4033,6 +4452,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -4083,6 +4503,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash @@ -4146,6 +4567,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -4172,486 +4594,943 @@ module Orb Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol ) end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ] - ) + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil + ) + end + + sig do + override.returns( + { + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash end - attr_accessor :license_allocations - # The pricing model type - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol - ) - end - attr_accessor :model_type + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # The name of the price. - sig { returns(String) } - attr_accessor :name + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash + ) + end - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, + # When True, overage beyond the allocation is written off. + write_off_overage: nil + ) + end - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) + sig do + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } ) - ) + end + def to_hash + end end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + sig do + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # The license allocation price to add to the plan. - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash - ], - model_type: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( # The cadence to bill for this price on. - cadence:, + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + sig { returns(String) } + attr_accessor :item_id + # The pricing model type - model_type:, + sig { returns(Symbol) } + attr_accessor :model_type + # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, + sig { returns(String) } + attr_accessor :name + # The id of the billable metric for the price. Only needed if the price is # usage-based. - billable_metric_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - billed_in_advance: nil, + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + # For custom cadence: specifies the duration of the billing period in days or # months. - billing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - currency: nil, + sig { returns(T.nilable(String)) } + attr_accessor :currency + # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. - external_price_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + # If the Price represents a fixed cost, this represents the quantity of units # applied. - fixed_price_quantity: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + # The property used to group this price on an invoice - invoice_grouping_key: nil, + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + # The ID of the license type to associate with this price. - license_type_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - metadata: nil, + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - reference_id: nil - ) - end + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - sig do - override.returns( - { + sig do + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ], - model_type: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) - end - def to_hash - end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + sig do + override.returns( + { + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + attr_accessor :filters - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ] + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: ) - end - def self.values - end - end + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, - Orb::Internal::AnyHash + sig do + override.returns( + { + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end + def to_hash + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end end - OrSymbol = T.type_alias { T.any(Symbol, String) } + end - UNIT = - T.let( - :unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ) + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ] - ) - end - def self.values - end - end - end + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4668,6 +5547,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4768,12 +5663,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4801,14 +5696,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4847,20 +5742,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4890,52 +5785,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -4943,13 +5879,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -4957,149 +5889,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -5107,11 +5943,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -5124,22 +5976,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -5241,11 +6077,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -5275,12 +6111,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -5319,7 +6155,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -5327,12 +6163,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -5370,7 +6206,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5378,38 +6214,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -5417,102 +6253,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge - # Configuration for tiered_with_proration pricing + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -5520,26 +6326,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5654,9 +6460,9 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5688,8 +6494,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5732,7 +6538,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -5740,9 +6546,9 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -5783,7 +6589,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5791,38 +6597,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -5830,59 +6636,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -5891,11 +6697,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -5903,26 +6709,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -6037,9 +6843,9 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -6071,8 +6877,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -6115,7 +6921,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -6123,9 +6929,9 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -6166,7 +6972,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -6174,38 +6980,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -6213,72 +7019,144 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The event property used to group usage before applying allocations + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :event_day_property - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -6286,30 +7164,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :metered_allowance_config sig do params( - daily_credit_allowance_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -6420,10 +7298,10 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -6454,10 +7332,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -6498,7 +7376,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :metered_allowance ) end @@ -6506,10 +7384,10 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -6549,7 +7427,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -6557,38 +7435,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -6596,136 +7474,96 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :allowance_grouping_value - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :default_unit_amount + attr_accessor :consumption_grouping_value - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :unit_amount - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name - # Configuration for daily_credit_allowance pricing + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end diff --git a/rbi/orb/models/changed_subscription_resources.rbi b/rbi/orb/models/changed_subscription_resources.rbi index cdcb94d89..a4d30b95c 100644 --- a/rbi/orb/models/changed_subscription_resources.rbi +++ b/rbi/orb/models/changed_subscription_resources.rbi @@ -1413,6 +1413,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice.rbi b/rbi/orb/models/invoice.rbi index bb842b789..036fdc3b6 100644 --- a/rbi/orb/models/invoice.rbi +++ b/rbi/orb/models/invoice.rbi @@ -1218,6 +1218,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/orb/models/invoice_fetch_upcoming_response.rbi index 3df35998b..2baf2a60e 100644 --- a/rbi/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/orb/models/invoice_fetch_upcoming_response.rbi @@ -1321,6 +1321,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice_line_item_create_response.rbi b/rbi/orb/models/invoice_line_item_create_response.rbi index 0fd3d126e..2c8b8d171 100644 --- a/rbi/orb/models/invoice_line_item_create_response.rbi +++ b/rbi/orb/models/invoice_line_item_create_response.rbi @@ -160,6 +160,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/per_price_cost.rbi b/rbi/orb/models/per_price_cost.rbi index 70a6e23b1..e361ee40c 100644 --- a/rbi/orb/models/per_price_cost.rbi +++ b/rbi/orb/models/per_price_cost.rbi @@ -58,6 +58,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/plan.rbi b/rbi/orb/models/plan.rbi index 37b5179f7..27eb4943e 100644 --- a/rbi/orb/models/plan.rbi +++ b/rbi/orb/models/plan.rbi @@ -192,6 +192,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/plan_create_params.rbi b/rbi/orb/models/plan_create_params.rbi index 08d699b23..637045c7f 100644 --- a/rbi/orb/models/plan_create_params.rbi +++ b/rbi/orb/models/plan_create_params.rbi @@ -209,6 +209,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, + Orb::PlanCreateParams::Price::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -258,6 +259,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::OrHash, Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::OrHash, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::PlanCreateParams::Price::Price::Percent::OrHash, Orb::PlanCreateParams::Price::Price::EventOutput::OrHash @@ -316,6 +318,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, + Orb::PlanCreateParams::Price::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -787,6 +790,7 @@ module Orb Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, + Orb::PlanCreateParams::Price::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -2899,6 +2903,421 @@ module Orb end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol, + item_id: String, + metered_allowance_config: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol, + item_id: String, + metered_allowance_config: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/plan_version.rbi b/rbi/orb/models/plan_version.rbi index ddca90d74..2d774f124 100644 --- a/rbi/orb/models/plan_version.rbi +++ b/rbi/orb/models/plan_version.rbi @@ -72,6 +72,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/price.rbi b/rbi/orb/models/price.rbi index 547173faa..52544d432 100644 --- a/rbi/orb/models/price.rbi +++ b/rbi/orb/models/price.rbi @@ -47,6 +47,7 @@ module Orb Orb::Price::CumulativeGroupedBulk, Orb::Price::CumulativeGroupedAllocation, Orb::Price::DailyCreditAllowance, + Orb::Price::MeteredAllowance, Orb::Price::MinimumComposite, Orb::Price::Percent, Orb::Price::EventOutput @@ -20853,6 +20854,732 @@ module Orb end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Price::MeteredAllowance, Orb::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig { returns(Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol) } + attr_accessor :billing_mode + + sig { returns(Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) } + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[Orb::Price::MeteredAllowance::CompositePriceFilter] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::MeteredAllowance::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # 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`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + # Configuration for metered_allowance pricing + sig { returns(Orb::Price::MeteredAllowance::MeteredAllowanceConfig) } + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig { returns(Orb::Price::MeteredAllowance::PriceType::TaggedSymbol) } + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # 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. + sig { returns(T.nilable(Orb::Price::MeteredAllowance::LicenseType)) } + attr_reader :license_type + + sig do + params( + license_type: + T.nilable(Orb::Price::MeteredAllowance::LicenseType::OrHash) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: Orb::Price::MeteredAllowance::BillingMode::OrSymbol, + cadence: Orb::Price::MeteredAllowance::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::MeteredAllowance::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + currency: String, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::MeteredAllowance::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable(Orb::Price::MeteredAllowance::LicenseType::OrHash), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + 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:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + maximum:, + maximum_amount:, + # 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`. + metadata:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # 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. + license_type: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol, + cadence: Orb::Price::MeteredAllowance::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[Orb::Price::MeteredAllowance::CompositePriceFilter] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::MeteredAllowance::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + currency: String, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::MeteredAllowance::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: T.nilable(Orb::Price::MeteredAllowance::LicenseType) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MeteredAllowance::BillingMode) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MeteredAllowance::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let(:monthly, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ANNUAL = + T.let(:annual, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) + CUSTOM = + T.let(:custom, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) + + sig do + override.returns( + T::Array[Orb::Price::MeteredAllowance::Cadence::TaggedSymbol] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MeteredAllowance::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MeteredAllowance::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::MeteredAllowance::PriceType::TaggedSymbol] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MeteredAllowance::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # 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. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + class MinimumComposite < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_create_params.rbi b/rbi/orb/models/price_create_params.rbi index e05b578cc..c707df097 100644 --- a/rbi/orb/models/price_create_params.rbi +++ b/rbi/orb/models/price_create_params.rbi @@ -42,6 +42,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::PriceCreateParams::Body::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -83,6 +84,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, Orb::PriceCreateParams::Body::DailyCreditAllowance::OrHash, + Orb::PriceCreateParams::Body::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceCreateParams::Body::Percent::OrHash, Orb::PriceCreateParams::Body::EventOutput::OrHash @@ -131,6 +133,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::PriceCreateParams::Body::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -178,6 +181,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::PriceCreateParams::Body::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -1829,6 +1833,409 @@ module Orb end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_multiple_params.rbi b/rbi/orb/models/price_evaluate_multiple_params.rbi index c2adcdaca..11ec798a5 100644 --- a/rbi/orb/models/price_evaluate_multiple_params.rbi +++ b/rbi/orb/models/price_evaluate_multiple_params.rbi @@ -152,6 +152,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -203,6 +204,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput::OrHash @@ -272,6 +274,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -320,6 +323,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -1971,6 +1975,409 @@ module Orb end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_preview_events_params.rbi b/rbi/orb/models/price_evaluate_preview_events_params.rbi index c2709a947..9a0f0c862 100644 --- a/rbi/orb/models/price_evaluate_preview_events_params.rbi +++ b/rbi/orb/models/price_evaluate_preview_events_params.rbi @@ -253,6 +253,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -304,6 +305,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput::OrHash @@ -373,6 +375,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -421,6 +424,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -2072,6 +2076,409 @@ module Orb end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_interval.rbi b/rbi/orb/models/price_interval.rbi index 1c6911997..b3f747265 100644 --- a/rbi/orb/models/price_interval.rbi +++ b/rbi/orb/models/price_interval.rbi @@ -118,6 +118,7 @@ module Orb Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/subscription_create_params.rbi b/rbi/orb/models/subscription_create_params.rbi index 2593c64e1..3a5f41d97 100644 --- a/rbi/orb/models/subscription_create_params.rbi +++ b/rbi/orb/models/subscription_create_params.rbi @@ -617,6 +617,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -678,6 +679,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::Percent::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::OrHash @@ -765,6 +767,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -814,6 +817,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -2926,11 +2930,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -2938,7 +2942,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -2947,29 +2951,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3072,11 +3076,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3108,10 +3112,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3150,7 +3154,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3158,12 +3162,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3201,7 +3205,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3209,38 +3213,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3248,38 +3252,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3287,27 +3357,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3320,6 +3374,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3421,11 +3491,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3455,12 +3525,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3499,7 +3569,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3507,12 +3577,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3550,7 +3620,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3558,38 +3628,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3597,576 +3667,1385 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] - ) - end - def self.variants - end - end - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - module ExternalMarketplace - extend Orb::Internal::Type::Enum + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - GOOGLE = - T.let( - :google, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AWS = - T.let( - :aws, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AZURE = - T.let( - :azure, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) + sig do + params( + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ] - ) - end - def self.values - end - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void end + attr_writer :invoicing_cycle_configuration - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata - # The id of the price on the plan to replace in the subscription. + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] + ) + end + def self.variants + end + end + end + + module ExternalMarketplace + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GOOGLE = + T.let( + :google, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AWS = + T.let( + :aws, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AZURE = + T.let( + :azure, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ] + ) + end + def self.values + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + external_price_id: T.nilable(String), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. sig { returns(String) } attr_accessor :replaces_price_id - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::OrHash, + Orb::NewSubscriptionMinimumCompositePrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput::OrHash + ) + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, - Orb::NewSubscriptionMinimumCompositePrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput::OrHash - ) - ), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the subscription. - replaces_price_id:, - # The definition of a new allocation price to create and add to the subscription. - allocation_price: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - discounts: nil, - # The external price id of the price to add to the subscription. - external_price_id: nil, - # The new quantity of the price, if the price is a fixed price. - fixed_price_quantity: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - maximum_amount: nil, - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - metric_parameter_overrides: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - minimum_amount: nil, - # New subscription price request body params. - price: nil, - # The id of the price to add to the subscription. - price_id: nil - ) - end + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - discounts: T.nilable(T::Array[Orb::DiscountOverride]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: - T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } ) - ), - price_id: T.nilable(String) - } - ) - end - def to_hash - end + end + def to_hash + end + end + end - # New subscription price request body params. - module Price - extend Orb::Internal::Type::Union + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - Variants = - T.type_alias do - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4183,6 +5062,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4283,12 +5178,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4316,14 +5211,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4362,20 +5257,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4405,52 +5300,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -4458,13 +5394,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -4472,149 +5404,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -4622,11 +5458,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -4639,22 +5491,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4756,11 +5592,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4790,12 +5626,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4834,7 +5670,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -4842,12 +5678,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4885,7 +5721,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4893,38 +5729,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -4932,102 +5768,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge - # Configuration for tiered_with_proration pricing + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -5035,26 +5841,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5169,9 +5975,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5203,8 +6009,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5247,7 +6053,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -5255,9 +6061,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -5298,7 +6104,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5306,38 +6112,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -5345,59 +6151,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -5406,11 +6212,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -5418,26 +6224,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5552,9 +6358,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5586,8 +6392,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5630,7 +6436,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -5638,9 +6444,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -5681,7 +6487,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5689,38 +6495,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -5728,72 +6534,144 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The event property used to group usage before applying allocations + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :event_day_property - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -5801,30 +6679,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :metered_allowance_config sig do params( - daily_credit_allowance_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + metered_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -5935,10 +6813,10 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -5969,10 +6847,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -6013,7 +6891,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :metered_allowance ) end @@ -6021,10 +6899,10 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -6064,7 +6942,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -6072,38 +6950,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -6111,136 +6989,96 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :allowance_grouping_value - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :default_unit_amount + attr_accessor :consumption_grouping_value - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :unit_amount - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name - # Configuration for daily_credit_allowance pricing + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end diff --git a/rbi/orb/models/subscription_price_intervals_params.rbi b/rbi/orb/models/subscription_price_intervals_params.rbi index 6ede69c50..b3b6ab0cd 100644 --- a/rbi/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/orb/models/subscription_price_intervals_params.rbi @@ -279,6 +279,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -361,6 +362,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput::OrHash @@ -479,6 +481,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -741,6 +744,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -2392,6 +2396,409 @@ module Orb end end + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/orb/models/subscription_schedule_plan_change_params.rbi index d4111a459..02473bde6 100644 --- a/rbi/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/orb/models/subscription_schedule_plan_change_params.rbi @@ -674,6 +674,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -735,6 +736,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::OrHash @@ -822,6 +824,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -871,6 +874,7 @@ module Orb Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -2983,11 +2987,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -2995,7 +2999,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3004,29 +3008,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3129,11 +3133,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3165,10 +3169,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3207,7 +3211,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3215,12 +3219,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3258,7 +3262,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3266,38 +3270,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3305,38 +3309,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3344,27 +3414,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3377,6 +3431,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3478,11 +3548,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3512,12 +3582,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3556,7 +3626,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3564,12 +3634,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3607,7 +3677,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3615,38 +3685,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3654,584 +3724,1393 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - # Reset billing periods to be aligned with the plan change's effective date or - # start of the month. Defaults to `unchanged` which keeps subscription's existing - # billing cycle alignment. - module BillingCycleAlignment - extend Orb::Internal::Type::Enum + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - UNCHANGED = - T.let( - :unchanged, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - PLAN_CHANGE_DATE = - T.let( - :plan_change_date, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - START_OF_MONTH = - T.let( - :start_of_month, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) + sig do + params( + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ] - ) - end - def self.values - end - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void end + attr_writer :invoicing_cycle_configuration - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, - Orb::Internal::AnyHash + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end end - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. + module BillingCycleAlignment + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNCHANGED = + T.let( + :unchanged, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + PLAN_CHANGE_DATE = + T.let( + :plan_change_date, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + START_OF_MONTH = + T.let( + :start_of_month, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ] + ) + end + def self.values + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + external_price_id: T.nilable(String), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::OrHash, + Orb::NewSubscriptionMinimumCompositePrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash + ) + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, - Orb::NewSubscriptionMinimumCompositePrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash - ) - ), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the subscription. - replaces_price_id:, - # The definition of a new allocation price to create and add to the subscription. - allocation_price: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - discounts: nil, - # The external price id of the price to add to the subscription. - external_price_id: nil, - # The new quantity of the price, if the price is a fixed price. - fixed_price_quantity: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - maximum_amount: nil, - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - metric_parameter_overrides: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - minimum_amount: nil, - # New subscription price request body params. - price: nil, - # The id of the price to add to the subscription. - price_id: nil - ) - end + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - discounts: T.nilable(T::Array[Orb::DiscountOverride]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: - T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } ) - ), - price_id: T.nilable(String) - } - ) - end - def to_hash - end + end + def to_hash + end + end + end - # New subscription price request body params. - module Price - extend Orb::Internal::Type::Union + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - Variants = - T.type_alias do - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4248,6 +5127,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4348,12 +5243,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4381,14 +5276,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4427,20 +5322,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4470,52 +5365,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -4523,13 +5459,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -4537,149 +5469,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end + attr_accessor :tier_lower_bound # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier + # Configuration for a single tiered with proration tier sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) end def self.new( + # Inclusive tier starting value + tier_lower_bound:, # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + unit_amount: ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -4687,11 +5523,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -4704,22 +5556,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4821,11 +5657,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4855,12 +5691,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4899,7 +5735,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :grouped_with_min_max_thresholds ) end @@ -4907,12 +5743,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4950,7 +5786,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4958,38 +5794,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -4997,102 +5833,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge - # Configuration for tiered_with_proration pricing + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -5100,26 +5906,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :cumulative_grouped_allocation_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5234,9 +6040,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5268,8 +6074,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5312,7 +6118,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :cumulative_grouped_allocation ) end @@ -5320,9 +6126,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -5363,7 +6169,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5371,38 +6177,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -5410,59 +6216,59 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # The overall allocation across all groups sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :cumulative_allocation - # The maximum amount to charge each group + # The allocation per individual group sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :group_allocation - # The minimum amount to charge each group, regardless of usage + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :grouping_key - # The base price charged per group + # The amount to charge for each unit outside of the allocation sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { + cumulative_allocation: String, + group_allocation: String, grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + unit_amount: String } ) end @@ -5471,11 +6277,11 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -5483,26 +6289,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :daily_credit_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -5617,9 +6423,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -5651,8 +6457,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -5695,7 +6501,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :daily_credit_allowance ) end @@ -5703,9 +6509,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -5746,7 +6552,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5754,38 +6560,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -5793,72 +6599,144 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :daily_allowance - # The allocation per individual group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The event property used to group usage before applying allocations + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :event_day_property - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for cumulative_grouped_allocation pricing + # Configuration for daily_credit_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -5866,30 +6744,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :metered_allowance_config sig do params( - daily_credit_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -6000,10 +6878,10 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -6034,10 +6912,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -6078,7 +6956,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :metered_allowance ) end @@ -6086,10 +6964,10 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -6129,7 +7007,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -6137,38 +7015,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -6176,136 +7054,96 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :allowance_grouping_value - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :default_unit_amount + attr_accessor :consumption_grouping_value - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :unit_amount - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name - # Configuration for daily_credit_allowance pricing + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end diff --git a/rbi/orb/resources/prices.rbi b/rbi/orb/resources/prices.rbi index e5b5c9f95..ab8af31af 100644 --- a/rbi/orb/resources/prices.rbi +++ b/rbi/orb/resources/prices.rbi @@ -69,6 +69,7 @@ module Orb Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, Orb::PriceCreateParams::Body::DailyCreditAllowance::OrHash, + Orb::PriceCreateParams::Body::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceCreateParams::Body::Percent::OrHash, Orb::PriceCreateParams::Body::EventOutput::OrHash diff --git a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs index eed66248b..f1a50f660 100644 --- a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +++ b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs @@ -325,6 +325,7 @@ module Orb | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance | Orb::NewPlanMinimumCompositePrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -1185,6 +1186,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, @@ -1785,6 +1960,7 @@ module Orb | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance | Orb::NewPlanMinimumCompositePrice | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -2645,6 +2821,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::cadence, diff --git a/sig/orb/models/beta_create_plan_version_params.rbs b/sig/orb/models/beta_create_plan_version_params.rbs index 90d1c96e5..23a67f07e 100644 --- a/sig/orb/models/beta_create_plan_version_params.rbs +++ b/sig/orb/models/beta_create_plan_version_params.rbs @@ -319,6 +319,7 @@ module Orb | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation | Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance | Orb::NewPlanMinimumCompositePrice | Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent | Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -1176,6 +1177,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, @@ -1768,6 +1943,7 @@ module Orb | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance | Orb::NewPlanMinimumCompositePrice | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput @@ -2625,6 +2801,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::cadence, diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index 8d1b46acd..5da1a7858 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -298,6 +298,7 @@ module Orb | Orb::NewPlanCumulativeGroupedBulkPrice | Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation | Orb::PlanCreateParams::Price::Price::DailyCreditAllowance + | Orb::PlanCreateParams::Price::Price::MeteredAllowance | Orb::NewPlanMinimumCompositePrice | Orb::PlanCreateParams::Price::Price::Percent | Orb::PlanCreateParams::Price::Price::EventOutput @@ -1155,6 +1156,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::PlanCreateParams::Price::Price::Percent::cadence, diff --git a/sig/orb/models/price.rbs b/sig/orb/models/price.rbs index 410a1e276..6be550a3f 100644 --- a/sig/orb/models/price.rbs +++ b/sig/orb/models/price.rbs @@ -30,6 +30,7 @@ module Orb | Orb::Price::CumulativeGroupedBulk | Orb::Price::CumulativeGroupedAllocation | Orb::Price::DailyCreditAllowance + | Orb::Price::MeteredAllowance | Orb::Price::MinimumComposite | Orb::Price::Percent | Orb::Price::EventOutput @@ -8860,6 +8861,324 @@ module Orb end end + type metered_allowance = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :metered_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MeteredAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MeteredAllowance::LicenseType? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode + + attr_accessor cadence: Orb::Models::Price::MeteredAllowance::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::MeteredAllowance::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::MeteredAllowance::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MeteredAllowance::price_type, + replaces_price_id: String?, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::MeteredAllowance::LicenseType?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :metered_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MeteredAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MeteredAllowance::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator] + end + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::price_type] + end + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + type minimum_composite = { id: String, diff --git a/sig/orb/models/price_create_params.rbs b/sig/orb/models/price_create_params.rbs index 182529530..28bd11e53 100644 --- a/sig/orb/models/price_create_params.rbs +++ b/sig/orb/models/price_create_params.rbs @@ -50,6 +50,7 @@ module Orb | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceCreateParams::Body::CumulativeGroupedAllocation | Orb::PriceCreateParams::Body::DailyCreditAllowance + | Orb::PriceCreateParams::Body::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceCreateParams::Body::Percent | Orb::PriceCreateParams::Body::EventOutput @@ -701,6 +702,170 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::PriceCreateParams::Body::Percent::cadence, diff --git a/sig/orb/models/price_evaluate_multiple_params.rbs b/sig/orb/models/price_evaluate_multiple_params.rbs index 188a4c38a..356274c78 100644 --- a/sig/orb/models/price_evaluate_multiple_params.rbs +++ b/sig/orb/models/price_evaluate_multiple_params.rbs @@ -119,6 +119,7 @@ module Orb | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance + | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -793,6 +794,175 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::cadence, diff --git a/sig/orb/models/price_evaluate_preview_events_params.rbs b/sig/orb/models/price_evaluate_preview_events_params.rbs index c4b00e05a..ac7842b23 100644 --- a/sig/orb/models/price_evaluate_preview_events_params.rbs +++ b/sig/orb/models/price_evaluate_preview_events_params.rbs @@ -165,6 +165,7 @@ module Orb | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance + | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -839,6 +840,175 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_create_params.rbs b/sig/orb/models/subscription_create_params.rbs index 8bc42f6e5..04cbc195e 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -325,6 +325,7 @@ module Orb | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation | Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance + | Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionCreateParams::AddPrice::Price::Percent | Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -1182,6 +1183,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, @@ -1642,6 +1817,7 @@ module Orb | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation | Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent | Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput @@ -2499,6 +2675,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_price_intervals_params.rbs b/sig/orb/models/subscription_price_intervals_params.rbs index 297e0a916..faba710d3 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -268,6 +268,7 @@ module Orb | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation | Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance + | Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent | Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -942,6 +943,175 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index a0faa537c..70b16e6dd 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -306,6 +306,7 @@ module Orb | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance + | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -1163,6 +1164,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, @@ -1624,6 +1799,7 @@ module Orb | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput @@ -2481,6 +2657,180 @@ module Orb end end + type metered_allowance = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::cadence, diff --git a/test/orb/resources/prices/external_price_id_test.rb b/test/orb/resources/prices/external_price_id_test.rb index 27e0f29ee..941f8d6fe 100644 --- a/test/orb/resources/prices/external_price_id_test.rb +++ b/test/orb/resources/prices/external_price_id_test.rb @@ -41,6 +41,7 @@ def test_update in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -977,6 +978,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -1115,6 +1148,7 @@ def test_fetch in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -2051,6 +2085,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, diff --git a/test/orb/resources/prices_test.rb b/test/orb/resources/prices_test.rb index e62064279..77aea2042 100644 --- a/test/orb/resources/prices_test.rb +++ b/test/orb/resources/prices_test.rb @@ -51,6 +51,7 @@ def test_create_required_params in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -987,6 +988,38 @@ def test_create_required_params dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -1125,6 +1158,7 @@ def test_update in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -2061,6 +2095,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -2206,6 +2272,7 @@ def test_list in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -3142,6 +3209,38 @@ def test_list dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -3335,6 +3434,7 @@ def test_fetch in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -4271,6 +4371,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, From 5f0254dff5af51dd7a0b1302adc3a7c8db209011 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 01:14:32 +0000 Subject: [PATCH 17/22] feat(api): api update --- .stats.yml | 4 ++-- lib/orb/models/dimensional_price_group.rb | 2 +- rbi/orb/models/dimensional_price_group.rbi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2d7bf679f..0f27fc0a0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-6ba9b1b34b3995136fce37ca4bfa7ec253213680ef1d49d74960f55d22fde5dc.yml -openapi_spec_hash: 56d69d79bef9db11216cf8764106040f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-cbb433962c75b95b0c00c453c3a2e39a88f4291a92c093f27a3f52d1b52785a2.yml +openapi_spec_hash: 46b3934a43850209dad40e883aa5d1bd config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/dimensional_price_group.rb b/lib/orb/models/dimensional_price_group.rb index 9d3440cff..d5890cfe3 100644 --- a/lib/orb/models/dimensional_price_group.rb +++ b/lib/orb/models/dimensional_price_group.rb @@ -49,7 +49,7 @@ class DimensionalPriceGroup < Orb::Internal::Type::BaseModel # {Orb::Models::DimensionalPriceGroup} for more details. # # A dimensional price group is used to partition the result of a billable metric - # by a set of dimensions. Prices in a price group must specify the parition used + # by a set of dimensions. Prices in a price group must specify the partition used # to derive their usage. # # @param id [String] diff --git a/rbi/orb/models/dimensional_price_group.rbi b/rbi/orb/models/dimensional_price_group.rbi index 82a3d93bd..8a1d8bd13 100644 --- a/rbi/orb/models/dimensional_price_group.rbi +++ b/rbi/orb/models/dimensional_price_group.rbi @@ -37,7 +37,7 @@ module Orb attr_accessor :name # A dimensional price group is used to partition the result of a billable metric - # by a set of dimensions. Prices in a price group must specify the parition used + # by a set of dimensions. Prices in a price group must specify the partition used # to derive their usage. sig do params( From 6f796af8274ac07b0212a71aa7f4514b202e094b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 01:14:34 +0000 Subject: [PATCH 18/22] feat(api): api update --- .stats.yml | 4 +- lib/orb/models/accounting_provider_config.rb | 17 ++++++-- lib/orb/models/customer.rb | 1 - rbi/orb/models/accounting_provider_config.rbi | 43 ++++++++++++++++--- rbi/orb/models/customer.rbi | 5 --- sig/orb/models/accounting_provider_config.rbs | 25 +++++++++-- sig/orb/models/customer.rbs | 3 +- 7 files changed, 76 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0f27fc0a0..d0f33af23 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-cbb433962c75b95b0c00c453c3a2e39a88f4291a92c093f27a3f52d1b52785a2.yml -openapi_spec_hash: 46b3934a43850209dad40e883aa5d1bd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-8b0ad117378120e92c83db4289345b202e96ee8cdd187e25eadd49f8220fd2c2.yml +openapi_spec_hash: c54dfea4283acbda4f01e8da6ac0e651 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/accounting_provider_config.rb b/lib/orb/models/accounting_provider_config.rb index fe2b7ed05..9b74c3479 100644 --- a/lib/orb/models/accounting_provider_config.rb +++ b/lib/orb/models/accounting_provider_config.rb @@ -10,12 +10,23 @@ class AccountingProviderConfig < Orb::Internal::Type::BaseModel # @!attribute provider_type # - # @return [String] - required :provider_type, String + # @return [Symbol, Orb::Models::AccountingProviderConfig::ProviderType] + required :provider_type, enum: -> { Orb::AccountingProviderConfig::ProviderType } # @!method initialize(external_provider_id:, provider_type:) # @param external_provider_id [String] - # @param provider_type [String] + # @param provider_type [Symbol, Orb::Models::AccountingProviderConfig::ProviderType] + + # @see Orb::Models::AccountingProviderConfig#provider_type + module ProviderType + extend Orb::Internal::Type::Enum + + QUICKBOOKS = :quickbooks + NETSUITE = :netsuite + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/orb/models/customer.rb b/lib/orb/models/customer.rb index 923f9d908..7cc1ba272 100644 --- a/lib/orb/models/customer.rb +++ b/lib/orb/models/customer.rb @@ -452,7 +452,6 @@ module ProviderType QUICKBOOKS = :quickbooks NETSUITE = :netsuite - NETSUITE_AMPERSAND = :netsuite_ampersand # @!method self.values # @return [Array] diff --git a/rbi/orb/models/accounting_provider_config.rbi b/rbi/orb/models/accounting_provider_config.rbi index a99c5dbf6..e675ed48d 100644 --- a/rbi/orb/models/accounting_provider_config.rbi +++ b/rbi/orb/models/accounting_provider_config.rbi @@ -11,24 +11,57 @@ module Orb sig { returns(String) } attr_accessor :external_provider_id - sig { returns(String) } + sig { returns(Orb::AccountingProviderConfig::ProviderType::OrSymbol) } attr_accessor :provider_type sig do - params(external_provider_id: String, provider_type: String).returns( - T.attached_class - ) + params( + external_provider_id: String, + provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol + ).returns(T.attached_class) end def self.new(external_provider_id:, provider_type:) end sig do override.returns( - { external_provider_id: String, provider_type: String } + { + external_provider_id: String, + provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol + } ) end def to_hash end + + module ProviderType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::AccountingProviderConfig::ProviderType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + QUICKBOOKS = + T.let( + :quickbooks, + Orb::AccountingProviderConfig::ProviderType::TaggedSymbol + ) + NETSUITE = + T.let( + :netsuite, + Orb::AccountingProviderConfig::ProviderType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::AccountingProviderConfig::ProviderType::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/orb/models/customer.rbi b/rbi/orb/models/customer.rbi index 29e4b1501..b66c0c706 100644 --- a/rbi/orb/models/customer.rbi +++ b/rbi/orb/models/customer.rbi @@ -761,11 +761,6 @@ module Orb :netsuite, Orb::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType::TaggedSymbol ) - NETSUITE_AMPERSAND = - T.let( - :netsuite_ampersand, - Orb::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType::TaggedSymbol - ) sig do override.returns( diff --git a/sig/orb/models/accounting_provider_config.rbs b/sig/orb/models/accounting_provider_config.rbs index c80ba3487..711714792 100644 --- a/sig/orb/models/accounting_provider_config.rbs +++ b/sig/orb/models/accounting_provider_config.rbs @@ -1,19 +1,36 @@ module Orb module Models type accounting_provider_config = - { external_provider_id: String, provider_type: String } + { + external_provider_id: String, + provider_type: Orb::Models::AccountingProviderConfig::provider_type + } class AccountingProviderConfig < Orb::Internal::Type::BaseModel attr_accessor external_provider_id: String - attr_accessor provider_type: String + attr_accessor provider_type: Orb::Models::AccountingProviderConfig::provider_type def initialize: ( external_provider_id: String, - provider_type: String + provider_type: Orb::Models::AccountingProviderConfig::provider_type ) -> void - def to_hash: -> { external_provider_id: String, provider_type: String } + def to_hash: -> { + external_provider_id: String, + provider_type: Orb::Models::AccountingProviderConfig::provider_type + } + + type provider_type = :quickbooks | :netsuite + + module ProviderType + extend Orb::Internal::Type::Enum + + QUICKBOOKS: :quickbooks + NETSUITE: :netsuite + + def self?.values: -> ::Array[Orb::Models::AccountingProviderConfig::provider_type] + end end end end diff --git a/sig/orb/models/customer.rbs b/sig/orb/models/customer.rbs index dd42ee8d6..5cf50667e 100644 --- a/sig/orb/models/customer.rbs +++ b/sig/orb/models/customer.rbs @@ -221,14 +221,13 @@ module Orb provider_type: Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::provider_type } - type provider_type = :quickbooks | :netsuite | :netsuite_ampersand + type provider_type = :quickbooks | :netsuite module ProviderType extend Orb::Internal::Type::Enum QUICKBOOKS: :quickbooks NETSUITE: :netsuite - NETSUITE_AMPERSAND: :netsuite_ampersand def self?.values: -> ::Array[Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::provider_type] end From 4fa43675278ba33b0a666c2cc89ee1a3d1db756f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 22:14:35 +0000 Subject: [PATCH 19/22] feat(api): api update --- .stats.yml | 4 ++-- lib/orb/resources/metrics.rb | 10 +++++----- rbi/orb/resources/metrics.rbi | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index d0f33af23..b64404b44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-8b0ad117378120e92c83db4289345b202e96ee8cdd187e25eadd49f8220fd2c2.yml -openapi_spec_hash: c54dfea4283acbda4f01e8da6ac0e651 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-2d39efd20f8184172496270fb54e1c8ef0ef01a9e3fc88ac971dc6470c8f2db7.yml +openapi_spec_hash: 812c2e5e36b9c992e3e2d986a8b31b0f config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/resources/metrics.rb b/lib/orb/resources/metrics.rb index a94380ccc..582478123 100644 --- a/lib/orb/resources/metrics.rb +++ b/lib/orb/resources/metrics.rb @@ -73,9 +73,8 @@ def update(metric_id, params = {}) # Some parameter documentations has been truncated, see # {Orb::Models::MetricListParams} for more details. # - # This endpoint is used to fetch [metric](/core-concepts##metric) details given a - # metric identifier. It returns information about the metrics including its name, - # description, and item. + # This endpoint is used to list [metrics](/core-concepts#metric). It returns + # information about the metrics including its name, description, and item. # # @overload list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, limit: nil, request_options: {}) # @@ -114,8 +113,9 @@ def list(params = {}) ) end - # This endpoint is used to list [metrics](/core-concepts#metric). It returns - # information about the metrics including its name, description, and item. + # This endpoint is used to fetch [metric](/core-concepts#metric) details given a + # metric identifier. It returns information about the metrics including its name, + # description, and item. # # @overload fetch(metric_id, request_options: {}) # diff --git a/rbi/orb/resources/metrics.rbi b/rbi/orb/resources/metrics.rbi index 1a14d0df1..b484084f1 100644 --- a/rbi/orb/resources/metrics.rbi +++ b/rbi/orb/resources/metrics.rbi @@ -56,9 +56,8 @@ module Orb ) end - # This endpoint is used to fetch [metric](/core-concepts##metric) details given a - # metric identifier. It returns information about the metrics including its name, - # description, and item. + # This endpoint is used to list [metrics](/core-concepts#metric). It returns + # information about the metrics including its name, description, and item. sig do params( created_at_gt: T.nilable(Time), @@ -84,8 +83,9 @@ module Orb ) end - # This endpoint is used to list [metrics](/core-concepts#metric). It returns - # information about the metrics including its name, description, and item. + # This endpoint is used to fetch [metric](/core-concepts#metric) details given a + # metric identifier. It returns information about the metrics including its name, + # description, and item. sig do params( metric_id: String, From b4e2776acd7d8f16e4638ffae48252fe359965b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 20:14:36 +0000 Subject: [PATCH 20/22] feat(api): api update --- .stats.yml | 4 ++-- .../models/changed_subscription_resources.rb | 5 +++++ lib/orb/models/customer.rb | 5 +++++ lib/orb/models/customer_create_params.rb | 5 +++++ lib/orb/models/customer_tax_id.rb | 16 +++++++++++++- .../customer_update_by_external_id_params.rb | 5 +++++ lib/orb/models/customer_update_params.rb | 5 +++++ lib/orb/models/invoice.rb | 5 +++++ .../models/invoice_fetch_upcoming_response.rb | 5 +++++ .../models/invoice_issue_summary_response.rb | 5 +++++ .../models/invoice_list_summary_response.rb | 5 +++++ .../models/changed_subscription_resources.rbi | 10 +++++++++ rbi/orb/models/customer.rbi | 10 +++++++++ rbi/orb/models/customer_create_params.rbi | 10 +++++++++ rbi/orb/models/customer_tax_id.rbi | 16 +++++++++++++- .../customer_update_by_external_id_params.rbi | 10 +++++++++ rbi/orb/models/customer_update_params.rbi | 10 +++++++++ rbi/orb/models/invoice.rbi | 10 +++++++++ .../invoice_fetch_upcoming_response.rbi | 10 +++++++++ .../models/invoice_issue_summary_response.rbi | 10 +++++++++ .../models/invoice_list_summary_response.rbi | 10 +++++++++ rbi/orb/resources/customers.rbi | 15 +++++++++++++ sig/orb/models/customer_tax_id.rbs | 22 +++++++++++++++++-- 23 files changed, 202 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index b64404b44..dfc5be990 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-2d39efd20f8184172496270fb54e1c8ef0ef01a9e3fc88ac971dc6470c8f2db7.yml -openapi_spec_hash: 812c2e5e36b9c992e3e2d986a8b31b0f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-71d1ace393e7a2ded73e3c2ef9778c3dfefa88b0d4975f14f6c6d4cfd044e087.yml +openapi_spec_hash: a5c295712ca7eef32912a1ec1dfd4019 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/changed_subscription_resources.rb b/lib/orb/models/changed_subscription_resources.rb index 75a70c0a4..31fbc09c2 100644 --- a/lib/orb/models/changed_subscription_resources.rb +++ b/lib/orb/models/changed_subscription_resources.rb @@ -148,11 +148,13 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -164,6 +166,7 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -194,6 +197,7 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -215,6 +219,7 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/customer.rb b/lib/orb/models/customer.rb index 7cc1ba272..ab54a5028 100644 --- a/lib/orb/models/customer.rb +++ b/lib/orb/models/customer.rb @@ -178,11 +178,13 @@ class Customer < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -194,6 +196,7 @@ class Customer < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -224,6 +227,7 @@ class Customer < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -245,6 +249,7 @@ class Customer < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/customer_create_params.rb b/lib/orb/models/customer_create_params.rb index b865cd20c..51007365b 100644 --- a/lib/orb/models/customer_create_params.rb +++ b/lib/orb/models/customer_create_params.rb @@ -185,11 +185,13 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -201,6 +203,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -231,6 +234,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -252,6 +256,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/customer_tax_id.rb b/lib/orb/models/customer_tax_id.rb index 124b5325c..cfa1e1368 100644 --- a/lib/orb/models/customer_tax_id.rb +++ b/lib/orb/models/customer_tax_id.rb @@ -76,11 +76,13 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -92,6 +94,7 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -122,6 +125,7 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -143,6 +147,7 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -204,9 +209,9 @@ module Country CO = :CO CR = :CR CV = :CV - DE = :DE CY = :CY CZ = :CZ + DE = :DE DK = :DK DO = :DO EC = :EC @@ -216,9 +221,11 @@ module Country ET = :ET EU = :EU FI = :FI + FO = :FO FR = :FR GB = :GB GE = :GE + GI = :GI GN = :GN GR = :GR HK = :HK @@ -238,6 +245,7 @@ module Country KZ = :KZ LA = :LA LI = :LI + LK = :LK LT = :LT LU = :LU LV = :LV @@ -259,6 +267,7 @@ module Country PH = :PH PL = :PL PT = :PT + PY = :PY RO = :RO RS = :RS RU = :RU @@ -339,8 +348,10 @@ module Type ES_CIF = :es_cif ET_TIN = :et_tin EU_OSS_VAT = :eu_oss_vat + FO_VAT = :fo_vat GB_VAT = :gb_vat GE_VAT = :ge_vat + GI_TIN = :gi_tin GN_NIF = :gn_nif HK_BR = :hk_br HR_OIB = :hr_oib @@ -349,6 +360,7 @@ module Type IL_VAT = :il_vat IN_GST = :in_gst IS_VAT = :is_vat + IT_CF = :it_cf JP_CN = :jp_cn JP_RN = :jp_rn JP_TRN = :jp_trn @@ -360,6 +372,7 @@ module Type LA_TIN = :la_tin LI_UID = :li_uid LI_VAT = :li_vat + LK_VAT = :lk_vat MA_VAT = :ma_vat MD_VAT = :md_vat ME_PIB = :me_pib @@ -378,6 +391,7 @@ module Type PE_RUC = :pe_ruc PH_TIN = :ph_tin PL_NIP = :pl_nip + PY_RUC = :py_ruc RO_TIN = :ro_tin RS_PIB = :rs_pib RU_INN = :ru_inn diff --git a/lib/orb/models/customer_update_by_external_id_params.rb b/lib/orb/models/customer_update_by_external_id_params.rb index dc0aaf8df..f7a56f372 100644 --- a/lib/orb/models/customer_update_by_external_id_params.rb +++ b/lib/orb/models/customer_update_by_external_id_params.rb @@ -202,11 +202,13 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -218,6 +220,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -248,6 +251,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -269,6 +273,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/customer_update_params.rb b/lib/orb/models/customer_update_params.rb index 3fc1015fb..ef4e7dd0e 100644 --- a/lib/orb/models/customer_update_params.rb +++ b/lib/orb/models/customer_update_params.rb @@ -196,11 +196,13 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -212,6 +214,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -242,6 +245,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -263,6 +267,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index fe107ec60..fcf0d39b6 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -112,11 +112,13 @@ class Invoice < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -128,6 +130,7 @@ class Invoice < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -158,6 +161,7 @@ class Invoice < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -179,6 +183,7 @@ class Invoice < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 6bb4890ff..0528f768a 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -114,11 +114,13 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -130,6 +132,7 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -160,6 +163,7 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -181,6 +185,7 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/invoice_issue_summary_response.rb b/lib/orb/models/invoice_issue_summary_response.rb index 9b275dff6..6afa5b43c 100644 --- a/lib/orb/models/invoice_issue_summary_response.rb +++ b/lib/orb/models/invoice_issue_summary_response.rb @@ -114,11 +114,13 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -130,6 +132,7 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -160,6 +163,7 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -181,6 +185,7 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/invoice_list_summary_response.rb b/lib/orb/models/invoice_list_summary_response.rb index 675a5b2fd..64df46474 100644 --- a/lib/orb/models/invoice_list_summary_response.rb +++ b/lib/orb/models/invoice_list_summary_response.rb @@ -114,11 +114,13 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -130,6 +132,7 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -160,6 +163,7 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -181,6 +185,7 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/changed_subscription_resources.rbi b/rbi/orb/models/changed_subscription_resources.rbi index a4d30b95c..1a0d9efb2 100644 --- a/rbi/orb/models/changed_subscription_resources.rbi +++ b/rbi/orb/models/changed_subscription_resources.rbi @@ -189,11 +189,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -205,6 +207,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -235,6 +238,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -256,6 +260,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -602,11 +607,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -618,6 +625,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -648,6 +656,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -669,6 +678,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/customer.rbi b/rbi/orb/models/customer.rbi index b66c0c706..65428e2af 100644 --- a/rbi/orb/models/customer.rbi +++ b/rbi/orb/models/customer.rbi @@ -149,11 +149,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -165,6 +167,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -195,6 +198,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -216,6 +220,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -437,11 +442,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -453,6 +460,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -483,6 +491,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -504,6 +513,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/customer_create_params.rbi b/rbi/orb/models/customer_create_params.rbi index fb38cc10c..1062025dc 100644 --- a/rbi/orb/models/customer_create_params.rbi +++ b/rbi/orb/models/customer_create_params.rbi @@ -206,11 +206,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -222,6 +224,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -252,6 +255,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -273,6 +277,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -451,11 +456,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -467,6 +474,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -497,6 +505,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -518,6 +527,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/customer_tax_id.rbi b/rbi/orb/models/customer_tax_id.rbi index c8f3fb2cc..949b56837 100644 --- a/rbi/orb/models/customer_tax_id.rbi +++ b/rbi/orb/models/customer_tax_id.rbi @@ -72,11 +72,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -88,6 +90,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -118,6 +121,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -139,6 +143,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -220,9 +225,9 @@ module Orb CO = T.let(:CO, Orb::CustomerTaxID::Country::TaggedSymbol) CR = T.let(:CR, Orb::CustomerTaxID::Country::TaggedSymbol) CV = T.let(:CV, Orb::CustomerTaxID::Country::TaggedSymbol) - DE = T.let(:DE, Orb::CustomerTaxID::Country::TaggedSymbol) CY = T.let(:CY, Orb::CustomerTaxID::Country::TaggedSymbol) CZ = T.let(:CZ, Orb::CustomerTaxID::Country::TaggedSymbol) + DE = T.let(:DE, Orb::CustomerTaxID::Country::TaggedSymbol) DK = T.let(:DK, Orb::CustomerTaxID::Country::TaggedSymbol) DO = T.let(:DO, Orb::CustomerTaxID::Country::TaggedSymbol) EC = T.let(:EC, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -232,9 +237,11 @@ module Orb ET = T.let(:ET, Orb::CustomerTaxID::Country::TaggedSymbol) EU = T.let(:EU, Orb::CustomerTaxID::Country::TaggedSymbol) FI = T.let(:FI, Orb::CustomerTaxID::Country::TaggedSymbol) + FO = T.let(:FO, Orb::CustomerTaxID::Country::TaggedSymbol) FR = T.let(:FR, Orb::CustomerTaxID::Country::TaggedSymbol) GB = T.let(:GB, Orb::CustomerTaxID::Country::TaggedSymbol) GE = T.let(:GE, Orb::CustomerTaxID::Country::TaggedSymbol) + GI = T.let(:GI, Orb::CustomerTaxID::Country::TaggedSymbol) GN = T.let(:GN, Orb::CustomerTaxID::Country::TaggedSymbol) GR = T.let(:GR, Orb::CustomerTaxID::Country::TaggedSymbol) HK = T.let(:HK, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -254,6 +261,7 @@ module Orb KZ = T.let(:KZ, Orb::CustomerTaxID::Country::TaggedSymbol) LA = T.let(:LA, Orb::CustomerTaxID::Country::TaggedSymbol) LI = T.let(:LI, Orb::CustomerTaxID::Country::TaggedSymbol) + LK = T.let(:LK, Orb::CustomerTaxID::Country::TaggedSymbol) LT = T.let(:LT, Orb::CustomerTaxID::Country::TaggedSymbol) LU = T.let(:LU, Orb::CustomerTaxID::Country::TaggedSymbol) LV = T.let(:LV, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -275,6 +283,7 @@ module Orb PH = T.let(:PH, Orb::CustomerTaxID::Country::TaggedSymbol) PL = T.let(:PL, Orb::CustomerTaxID::Country::TaggedSymbol) PT = T.let(:PT, Orb::CustomerTaxID::Country::TaggedSymbol) + PY = T.let(:PY, Orb::CustomerTaxID::Country::TaggedSymbol) RO = T.let(:RO, Orb::CustomerTaxID::Country::TaggedSymbol) RS = T.let(:RS, Orb::CustomerTaxID::Country::TaggedSymbol) RU = T.let(:RU, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -360,8 +369,10 @@ module Orb ES_CIF = T.let(:es_cif, Orb::CustomerTaxID::Type::TaggedSymbol) ET_TIN = T.let(:et_tin, Orb::CustomerTaxID::Type::TaggedSymbol) EU_OSS_VAT = T.let(:eu_oss_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + FO_VAT = T.let(:fo_vat, Orb::CustomerTaxID::Type::TaggedSymbol) GB_VAT = T.let(:gb_vat, Orb::CustomerTaxID::Type::TaggedSymbol) GE_VAT = T.let(:ge_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + GI_TIN = T.let(:gi_tin, Orb::CustomerTaxID::Type::TaggedSymbol) GN_NIF = T.let(:gn_nif, Orb::CustomerTaxID::Type::TaggedSymbol) HK_BR = T.let(:hk_br, Orb::CustomerTaxID::Type::TaggedSymbol) HR_OIB = T.let(:hr_oib, Orb::CustomerTaxID::Type::TaggedSymbol) @@ -370,6 +381,7 @@ module Orb IL_VAT = T.let(:il_vat, Orb::CustomerTaxID::Type::TaggedSymbol) IN_GST = T.let(:in_gst, Orb::CustomerTaxID::Type::TaggedSymbol) IS_VAT = T.let(:is_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + IT_CF = T.let(:it_cf, Orb::CustomerTaxID::Type::TaggedSymbol) JP_CN = T.let(:jp_cn, Orb::CustomerTaxID::Type::TaggedSymbol) JP_RN = T.let(:jp_rn, Orb::CustomerTaxID::Type::TaggedSymbol) JP_TRN = T.let(:jp_trn, Orb::CustomerTaxID::Type::TaggedSymbol) @@ -381,6 +393,7 @@ module Orb LA_TIN = T.let(:la_tin, Orb::CustomerTaxID::Type::TaggedSymbol) LI_UID = T.let(:li_uid, Orb::CustomerTaxID::Type::TaggedSymbol) LI_VAT = T.let(:li_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + LK_VAT = T.let(:lk_vat, Orb::CustomerTaxID::Type::TaggedSymbol) MA_VAT = T.let(:ma_vat, Orb::CustomerTaxID::Type::TaggedSymbol) MD_VAT = T.let(:md_vat, Orb::CustomerTaxID::Type::TaggedSymbol) ME_PIB = T.let(:me_pib, Orb::CustomerTaxID::Type::TaggedSymbol) @@ -399,6 +412,7 @@ module Orb PE_RUC = T.let(:pe_ruc, Orb::CustomerTaxID::Type::TaggedSymbol) PH_TIN = T.let(:ph_tin, Orb::CustomerTaxID::Type::TaggedSymbol) PL_NIP = T.let(:pl_nip, Orb::CustomerTaxID::Type::TaggedSymbol) + PY_RUC = T.let(:py_ruc, Orb::CustomerTaxID::Type::TaggedSymbol) RO_TIN = T.let(:ro_tin, Orb::CustomerTaxID::Type::TaggedSymbol) RS_PIB = T.let(:rs_pib, Orb::CustomerTaxID::Type::TaggedSymbol) RU_INN = T.let(:ru_inn, Orb::CustomerTaxID::Type::TaggedSymbol) diff --git a/rbi/orb/models/customer_update_by_external_id_params.rbi b/rbi/orb/models/customer_update_by_external_id_params.rbi index 94aeb2f6b..2fc58df7b 100644 --- a/rbi/orb/models/customer_update_by_external_id_params.rbi +++ b/rbi/orb/models/customer_update_by_external_id_params.rbi @@ -223,11 +223,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -239,6 +241,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -269,6 +272,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -290,6 +294,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -473,11 +478,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -489,6 +496,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -519,6 +527,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -540,6 +549,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/customer_update_params.rbi b/rbi/orb/models/customer_update_params.rbi index 1fff7dfc1..b63b8c779 100644 --- a/rbi/orb/models/customer_update_params.rbi +++ b/rbi/orb/models/customer_update_params.rbi @@ -215,11 +215,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -231,6 +233,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -261,6 +264,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -282,6 +286,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -461,11 +466,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -477,6 +484,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -507,6 +515,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -528,6 +537,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/invoice.rbi b/rbi/orb/models/invoice.rbi index 036fdc3b6..2e5fc5985 100644 --- a/rbi/orb/models/invoice.rbi +++ b/rbi/orb/models/invoice.rbi @@ -103,11 +103,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -119,6 +121,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -149,6 +152,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -170,6 +174,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -480,11 +485,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -496,6 +503,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -526,6 +534,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -547,6 +556,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/orb/models/invoice_fetch_upcoming_response.rbi index 2baf2a60e..0635ae4da 100644 --- a/rbi/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/orb/models/invoice_fetch_upcoming_response.rbi @@ -122,11 +122,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -138,6 +140,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -168,6 +171,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -189,6 +193,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -519,11 +524,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -535,6 +542,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -565,6 +573,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -586,6 +595,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/invoice_issue_summary_response.rbi b/rbi/orb/models/invoice_issue_summary_response.rbi index 69275c675..fe2f0972c 100644 --- a/rbi/orb/models/invoice_issue_summary_response.rbi +++ b/rbi/orb/models/invoice_issue_summary_response.rbi @@ -122,11 +122,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -138,6 +140,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -168,6 +171,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -189,6 +193,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -465,11 +470,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -481,6 +488,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -511,6 +519,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -532,6 +541,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/invoice_list_summary_response.rbi b/rbi/orb/models/invoice_list_summary_response.rbi index 8cbe2d7a7..337a5c9a6 100644 --- a/rbi/orb/models/invoice_list_summary_response.rbi +++ b/rbi/orb/models/invoice_list_summary_response.rbi @@ -119,11 +119,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -135,6 +137,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -165,6 +168,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -186,6 +190,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -462,11 +467,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -478,6 +485,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -508,6 +516,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -529,6 +538,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/resources/customers.rbi b/rbi/orb/resources/customers.rbi index c48ed64ff..f86a3a8b0 100644 --- a/rbi/orb/resources/customers.rbi +++ b/rbi/orb/resources/customers.rbi @@ -225,11 +225,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -241,6 +243,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -271,6 +274,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -292,6 +296,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -480,11 +485,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -496,6 +503,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -526,6 +534,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -547,6 +556,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -847,11 +857,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -863,6 +875,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -893,6 +906,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -914,6 +928,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/sig/orb/models/customer_tax_id.rbs b/sig/orb/models/customer_tax_id.rbs index 8d81dcf9f..a7e098b72 100644 --- a/sig/orb/models/customer_tax_id.rbs +++ b/sig/orb/models/customer_tax_id.rbs @@ -58,9 +58,9 @@ module Orb | :CO | :CR | :CV - | :DE | :CY | :CZ + | :DE | :DK | :DO | :EC @@ -70,9 +70,11 @@ module Orb | :ET | :EU | :FI + | :FO | :FR | :GB | :GE + | :GI | :GN | :GR | :HK @@ -92,6 +94,7 @@ module Orb | :KZ | :LA | :LI + | :LK | :LT | :LU | :LV @@ -113,6 +116,7 @@ module Orb | :PH | :PL | :PT + | :PY | :RO | :RS | :RU @@ -174,9 +178,9 @@ module Orb CO: :CO CR: :CR CV: :CV - DE: :DE CY: :CY CZ: :CZ + DE: :DE DK: :DK DO: :DO EC: :EC @@ -186,9 +190,11 @@ module Orb ET: :ET EU: :EU FI: :FI + FO: :FO FR: :FR GB: :GB GE: :GE + GI: :GI GN: :GN GR: :GR HK: :HK @@ -208,6 +214,7 @@ module Orb KZ: :KZ LA: :LA LI: :LI + LK: :LK LT: :LT LU: :LU LV: :LV @@ -229,6 +236,7 @@ module Orb PH: :PH PL: :PL PT: :PT + PY: :PY RO: :RO RS: :RS RU: :RU @@ -305,8 +313,10 @@ module Orb | :es_cif | :et_tin | :eu_oss_vat + | :fo_vat | :gb_vat | :ge_vat + | :gi_tin | :gn_nif | :hk_br | :hr_oib @@ -315,6 +325,7 @@ module Orb | :il_vat | :in_gst | :is_vat + | :it_cf | :jp_cn | :jp_rn | :jp_trn @@ -326,6 +337,7 @@ module Orb | :la_tin | :li_uid | :li_vat + | :lk_vat | :ma_vat | :md_vat | :me_pib @@ -344,6 +356,7 @@ module Orb | :pe_ruc | :ph_tin | :pl_nip + | :py_ruc | :ro_tin | :rs_pib | :ru_inn @@ -420,8 +433,10 @@ module Orb ES_CIF: :es_cif ET_TIN: :et_tin EU_OSS_VAT: :eu_oss_vat + FO_VAT: :fo_vat GB_VAT: :gb_vat GE_VAT: :ge_vat + GI_TIN: :gi_tin GN_NIF: :gn_nif HK_BR: :hk_br HR_OIB: :hr_oib @@ -430,6 +445,7 @@ module Orb IL_VAT: :il_vat IN_GST: :in_gst IS_VAT: :is_vat + IT_CF: :it_cf JP_CN: :jp_cn JP_RN: :jp_rn JP_TRN: :jp_trn @@ -441,6 +457,7 @@ module Orb LA_TIN: :la_tin LI_UID: :li_uid LI_VAT: :li_vat + LK_VAT: :lk_vat MA_VAT: :ma_vat MD_VAT: :md_vat ME_PIB: :me_pib @@ -459,6 +476,7 @@ module Orb PE_RUC: :pe_ruc PH_TIN: :ph_tin PL_NIP: :pl_nip + PY_RUC: :py_ruc RO_TIN: :ro_tin RS_PIB: :rs_pib RU_INN: :ru_inn From 0738a025b24db964db277bb3db1f6726308b1982 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 23:15:36 +0000 Subject: [PATCH 21/22] feat(api): api update --- .stats.yml | 4 +- ...rnal_plan_id_create_plan_version_params.rb | 658 +++- .../models/beta_create_plan_version_params.rb | 658 +++- .../models/changed_subscription_resources.rb | 4 +- lib/orb/models/invoice.rb | 4 +- .../models/invoice_fetch_upcoming_response.rb | 4 +- .../invoice_line_item_create_response.rb | 4 +- lib/orb/models/per_price_cost.rb | 4 +- lib/orb/models/plan.rb | 4 +- lib/orb/models/plan_create_params.rb | 328 +- lib/orb/models/plan_version.rb | 4 +- lib/orb/models/price.rb | 493 ++- lib/orb/models/price_create_params.rb | 314 +- .../models/price_evaluate_multiple_params.rb | 319 +- .../price_evaluate_preview_events_params.rb | 319 +- lib/orb/models/price_interval.rb | 4 +- lib/orb/models/subscription_create_params.rb | 658 +++- .../subscription_price_intervals_params.rb | 319 +- ...ubscription_schedule_plan_change_params.rb | 658 +++- lib/orb/resources/customers/credits/ledger.rb | 32 +- lib/orb/resources/prices.rb | 10 +- lib/orb/resources/prices/external_price_id.rb | 4 +- ...nal_plan_id_create_plan_version_params.rbi | 3358 +++++++++++------ .../beta_create_plan_version_params.rbi | 3356 ++++++++++------ .../models/changed_subscription_resources.rbi | 1 + rbi/orb/models/invoice.rbi | 1 + .../invoice_fetch_upcoming_response.rbi | 1 + .../invoice_line_item_create_response.rbi | 1 + rbi/orb/models/per_price_cost.rbi | 1 + rbi/orb/models/plan.rbi | 1 + rbi/orb/models/plan_create_params.rbi | 543 +++ rbi/orb/models/plan_version.rbi | 1 + rbi/orb/models/price.rbi | 906 +++++ rbi/orb/models/price_create_params.rbi | 531 +++ .../models/price_evaluate_multiple_params.rbi | 531 +++ .../price_evaluate_preview_events_params.rbi | 531 +++ rbi/orb/models/price_interval.rbi | 1 + rbi/orb/models/subscription_create_params.rbi | 2936 +++++++++----- .../subscription_price_intervals_params.rbi | 531 +++ ...bscription_schedule_plan_change_params.rbi | 3302 ++++++++++------ .../resources/customers/credits/ledger.rbi | 32 +- rbi/orb/resources/prices.rbi | 1 + ...nal_plan_id_create_plan_version_params.rbs | 468 +++ .../beta_create_plan_version_params.rbs | 468 +++ sig/orb/models/plan_create_params.rbs | 234 ++ sig/orb/models/price.rbs | 378 ++ sig/orb/models/price_create_params.rbs | 224 ++ .../models/price_evaluate_multiple_params.rbs | 229 ++ .../price_evaluate_preview_events_params.rbs | 229 ++ sig/orb/models/subscription_create_params.rbs | 468 +++ .../subscription_price_intervals_params.rbs | 229 ++ ...bscription_schedule_plan_change_params.rbs | 468 +++ .../prices/external_price_id_test.rb | 66 + test/orb/resources/prices_test.rb | 132 + 54 files changed, 20576 insertions(+), 4389 deletions(-) diff --git a/.stats.yml b/.stats.yml index dfc5be990..f3bbb69bb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-71d1ace393e7a2ded73e3c2ef9778c3dfefa88b0d4975f14f6c6d4cfd044e087.yml -openapi_spec_hash: a5c295712ca7eef32912a1ec1dfd4019 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-45297c0f1067cd444a30371110c69f876accf55f303a3dce9a4f74863b59f18f.yml +openapi_spec_hash: cd2f638b98c6e89342397fef860166b7 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb index cac56e3e1..9d027a5fe 100644 --- a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +++ b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb @@ -172,7 +172,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price }, nil?: true @@ -184,7 +184,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -471,6 +471,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration } @@ -784,6 +787,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2470,7 +2793,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] end end @@ -2594,7 +2917,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price }, nil?: true @@ -2608,7 +2931,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to replace this price from. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -2895,6 +3218,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration } @@ -3208,6 +3534,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4894,7 +5540,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/beta_create_plan_version_params.rb b/lib/orb/models/beta_create_plan_version_params.rb index fe7526cc8..7385a3af9 100644 --- a/lib/orb/models/beta_create_plan_version_params.rb +++ b/lib/orb/models/beta_create_plan_version_params.rb @@ -158,7 +158,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -168,7 +168,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -450,6 +450,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration } @@ -753,6 +756,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2432,7 +2755,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] end end @@ -2553,7 +2876,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -2565,7 +2888,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to replace this price from. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -2847,6 +3170,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration } @@ -3150,6 +3476,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4835,7 +5481,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/changed_subscription_resources.rb b/lib/orb/models/changed_subscription_resources.rb index 31fbc09c2..7b97ff2a9 100644 --- a/lib/orb/models/changed_subscription_resources.rb +++ b/lib/orb/models/changed_subscription_resources.rb @@ -857,7 +857,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -924,7 +924,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index fcf0d39b6..728b103f6 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -811,7 +811,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -876,7 +876,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 0528f768a..db63b4620 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -812,7 +812,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -878,7 +878,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_line_item_create_response.rb b/lib/orb/models/invoice_line_item_create_response.rb index c521c5073..bbce13420 100644 --- a/lib/orb/models/invoice_line_item_create_response.rb +++ b/lib/orb/models/invoice_line_item_create_response.rb @@ -83,7 +83,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -149,7 +149,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/per_price_cost.rb b/lib/orb/models/per_price_cost.rb index bf92f1333..49b2bf7bb 100644 --- a/lib/orb/models/per_price_cost.rb +++ b/lib/orb/models/per_price_cost.rb @@ -6,7 +6,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel # @!attribute price # The price object # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute price_id @@ -34,7 +34,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel optional :quantity, Float, nil?: true # @!method initialize(price:, price_id:, subtotal:, total:, quantity: nil) - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object # # @param price_id [String] The price the cost is associated with # diff --git a/lib/orb/models/plan.rb b/lib/orb/models/plan.rb index 82ce93e5f..10ef6a473 100644 --- a/lib/orb/models/plan.rb +++ b/lib/orb/models/plan.rb @@ -138,7 +138,7 @@ class Plan < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute product @@ -208,7 +208,7 @@ class Plan < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param product [Orb::Models::Plan::Product] # diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index 8f182bc32..129047549 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -136,7 +136,7 @@ class Price < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) @@ -146,7 +146,7 @@ class Price < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. # @see Orb::Models::PlanCreateParams::Price#license_allocation_price class LicenseAllocationPrice < Orb::Internal::Type::BaseModel @@ -423,6 +423,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::PlanCreateParams::Price::Price::TieredWithProration } variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } @@ -720,6 +723,325 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts} for + # more details. + # + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2383,7 +2705,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] end end diff --git a/lib/orb/models/plan_version.rb b/lib/orb/models/plan_version.rb index bbc5a7315..3fd3632fe 100644 --- a/lib/orb/models/plan_version.rb +++ b/lib/orb/models/plan_version.rb @@ -25,7 +25,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute version @@ -46,7 +46,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param version [Integer] diff --git a/lib/orb/models/price.rb b/lib/orb/models/price.rb index c2816b1ed..df1135ff0 100644 --- a/lib/orb/models/price.rb +++ b/lib/orb/models/price.rb @@ -45,6 +45,8 @@ module Price variant :matrix_with_allocation, -> { Orb::Price::MatrixWithAllocation } + variant :matrix_with_threshold_discounts, -> { Orb::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::Price::TieredWithProration } variant :unit_with_proration, -> { Orb::Price::UnitWithProration } @@ -5598,6 +5600,495 @@ class LicenseType < Orb::Internal::Type::BaseModel end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::BillingMode] + required :billing_mode, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { + Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter] + }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # 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`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::PriceType] + required :price_type, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # 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. + # + # @return [Orb::Models::Price::MatrixWithThresholdDiscounts::LicenseType, nil] + optional :license_type, -> { Orb::Price::MatrixWithThresholdDiscounts::LicenseType }, nil?: true + + # @!method 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:, matrix_with_threshold_discounts_config:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MatrixWithThresholdDiscounts} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param matrix_with_threshold_discounts_config [Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::MatrixWithThresholdDiscounts::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] } + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] } + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MatrixWithThresholdDiscounts::LicenseType} for more + # details. + # + # 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. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute id # @@ -13531,7 +14022,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] + # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index 524c5d49f..0a774796c 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -10,11 +10,11 @@ class PriceCreateParams < Orb::Internal::Type::BaseModel # @!attribute body # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] required :body, union: -> { Orb::PriceCreateParams::Body } # @!method initialize(body:, request_options: {}) - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -52,6 +52,9 @@ module Body variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -333,6 +336,311 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts} for more + # details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1671,7 +1979,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_multiple_params.rb b/lib/orb/models/price_evaluate_multiple_params.rb index 477176b70..68ac4b334 100644 --- a/lib/orb/models/price_evaluate_multiple_params.rb +++ b/lib/orb/models/price_evaluate_multiple_params.rb @@ -86,7 +86,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price }, nil?: true # @!attribute price_id @@ -107,7 +107,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -148,6 +148,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -441,6 +444,316 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1826,7 +2139,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_preview_events_params.rb b/lib/orb/models/price_evaluate_preview_events_params.rb index 6a5f2500a..4acd55ebe 100644 --- a/lib/orb/models/price_evaluate_preview_events_params.rb +++ b/lib/orb/models/price_evaluate_preview_events_params.rb @@ -144,7 +144,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price @@ -170,7 +170,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -211,6 +211,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -512,6 +515,316 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1898,7 +2211,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_interval.rb b/lib/orb/models/price_interval.rb index de7ea9bcf..dc333b58e 100644 --- a/lib/orb/models/price_interval.rb +++ b/lib/orb/models/price_interval.rb @@ -72,7 +72,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute start_date @@ -122,7 +122,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # # @param fixed_fee_quantity_transitions [Array, nil] The fixed fee quantity transitions for this price interval. This is only relevan # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f # diff --git a/lib/orb/models/subscription_create_params.rb b/lib/orb/models/subscription_create_params.rb index e285b2f22..7d3233214 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -449,7 +449,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionCreateParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -486,7 +486,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -528,6 +528,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration } variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice } @@ -830,6 +833,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2508,7 +2831,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] end end @@ -2659,7 +2982,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price }, nil?: true # @!attribute price_id @@ -2688,7 +3011,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. @@ -2728,6 +3051,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration } @@ -3032,6 +3358,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4712,7 +5358,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 546eddbfe..d638fdbe8 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -163,7 +163,7 @@ class Add < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price }, nil?: true # @!attribute price_id @@ -209,7 +209,7 @@ class Add < Orb::Internal::Type::BaseModel # # @param minimum_amount [Float, nil] The minimum amount that will be billed for this price interval for a given billi # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -379,6 +379,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -671,6 +674,316 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2054,7 +2367,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] end end diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index 05c2c22ca..64faabc91 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -421,7 +421,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -458,7 +458,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -501,6 +501,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration } @@ -806,6 +809,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -2492,7 +2815,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] end end @@ -2646,7 +2969,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price @@ -2680,7 +3003,7 @@ class ReplacePrice < Orb::Internal::Type::BaseModel # # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. @@ -2721,6 +3044,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration } @@ -3034,6 +3360,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -4720,7 +5366,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/resources/customers/credits/ledger.rb b/lib/orb/resources/customers/credits/ledger.rb index 962719b32..101c86a07 100644 --- a/lib/orb/resources/customers/credits/ledger.rb +++ b/lib/orb/resources/customers/credits/ledger.rb @@ -199,11 +199,17 @@ def list(customer_id, params = {}) # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # @@ -337,11 +343,17 @@ def create_entry(customer_id, params) # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # diff --git a/lib/orb/resources/prices.rb b/lib/orb/resources/prices.rb index fe01296d4..8650e25d8 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -39,11 +39,11 @@ class Prices # # @overload create(body:, request_options: {}) # - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceCreateParams def create(params) @@ -72,7 +72,7 @@ def create(params) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceUpdateParams def update(price_id, params = {}) @@ -100,7 +100,7 @@ def update(price_id, params = {}) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Internal::Page] + # @return [Orb::Internal::Page] # # @see Orb::Models::PriceListParams def list(params = {}) @@ -293,7 +293,7 @@ def evaluate_preview_events(params) # @param price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceFetchParams def fetch(price_id, params = {}) diff --git a/lib/orb/resources/prices/external_price_id.rb b/lib/orb/resources/prices/external_price_id.rb index 7e0c93fee..8ca392c08 100644 --- a/lib/orb/resources/prices/external_price_id.rb +++ b/lib/orb/resources/prices/external_price_id.rb @@ -29,7 +29,7 @@ class ExternalPriceID # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDUpdateParams def update(external_price_id, params = {}) @@ -52,7 +52,7 @@ def update(external_price_id, params = {}) # @param external_price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDFetchParams def fetch(external_price_id, params = {}) diff --git a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi index ea4d7bc61..22eafcfd0 100644 --- a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +++ b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi @@ -369,6 +369,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -419,6 +420,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -480,6 +482,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -952,6 +955,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -1450,11 +1454,11 @@ module Orb end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -1462,7 +1466,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1471,29 +1475,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_reader :tiered_with_proration_config + attr_reader :matrix_with_threshold_discounts_config sig do params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash ).void end - attr_writer :tiered_with_proration_config + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -1596,11 +1600,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1632,10 +1636,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1674,7 +1678,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :matrix_with_threshold_discounts ) end @@ -1682,12 +1686,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1725,7 +1729,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1733,38 +1737,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1772,48 +1776,100 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :tiers + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups - # Configuration for tiered_with_proration pricing sig do params( - tiers: + threshold_discount_groups: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - tiers: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -1821,41 +1877,114 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Inclusive tier starting value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :first_dimension_value - # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # Configuration for a single tiered with proration tier + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + sig do params( - tier_lower_bound: String, - unit_amount: String + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) ).returns(T.attached_class) end def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: + first_dimension_value:, + unit_amount:, + second_dimension_value: nil ) end sig do override.returns( - { tier_lower_bound: String, unit_amount: String } + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash @@ -1864,11 +1993,11 @@ module Orb end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end @@ -1876,27 +2005,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -1909,6 +2022,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2010,11 +2139,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2044,12 +2173,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2088,7 +2217,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :tiered_with_proration ) end @@ -2096,12 +2225,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2139,7 +2268,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2147,38 +2276,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -2186,72 +2315,103 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for tiered_with_proration pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params( + tier_lower_bound: String, + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2259,26 +2419,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :grouped_with_min_max_thresholds_config sig do params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2393,9 +2553,9 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2427,8 +2587,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2471,7 +2631,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :grouped_with_min_max_thresholds ) end @@ -2479,9 +2639,9 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, @@ -2522,7 +2682,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2530,38 +2690,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2569,59 +2729,59 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :grouping_key - # The allocation per individual group + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :maximum_charge - # The event property used to group usage before applying allocations + # The minimum amount to charge each group, regardless of usage sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :minimum_charge - # The amount to charge for each unit outside of the allocation + # The base price charged per group sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :per_unit_rate - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The event property used to group before applying thresholds grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2630,11 +2790,11 @@ module Orb end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2642,26 +2802,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :cumulative_grouped_allocation_config sig do params( - daily_credit_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2776,9 +2936,9 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2810,8 +2970,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2854,7 +3014,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :cumulative_grouped_allocation ) end @@ -2862,9 +3022,9 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -2905,7 +3065,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2913,38 +3073,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2952,144 +3112,72 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :cumulative_allocation - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The allocation per individual group sig { returns(String) } - attr_accessor :default_unit_amount - - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + attr_accessor :group_allocation - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :grouping_key - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end - class MeteredAllowance < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -3097,30 +3185,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :metered_allowance_config + attr_reader :daily_credit_allowance_config sig do params( - metered_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :metered_allowance_config + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3231,10 +3319,10 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, - metered_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -3265,10 +3353,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # Configuration for metered_allowance pricing - metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -3309,7 +3397,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :metered_allowance + model_type: :daily_credit_allowance ) end @@ -3317,10 +3405,10 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - metered_allowance_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -3360,7 +3448,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3368,38 +3456,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3407,104 +3495,144 @@ module Orb end end - class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :allowance_grouping_value + attr_accessor :daily_allowance - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :consumption_grouping_value + attr_accessor :default_unit_amount - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # Per-unit price applied to gross consumption and to the allowance credit. + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount - - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - sig { returns(T.nilable(String)) } - attr_reader :allowance_display_name - - sig { params(allowance_display_name: String).void } - attr_writer :allowance_display_name - - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - sig { returns(T.nilable(String)) } - attr_reader :consumption_display_name + attr_accessor :event_day_property - sig { params(consumption_display_name: String).void } - attr_writer :consumption_display_name + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do params( - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. - allowance_grouping_value:, - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. - consumption_grouping_value:, - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - grouping_key:, - # Per-unit price applied to gross consumption and to the allowance credit. - unit_amount:, - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - allowance_display_name: nil, - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - consumption_display_name: nil + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end - end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3512,7 +3640,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3521,29 +3649,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3646,11 +3774,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3682,10 +3810,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3724,7 +3852,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3732,12 +3860,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3775,7 +3903,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3783,38 +3911,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3822,38 +3950,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3861,27 +4055,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3894,6 +4072,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3995,11 +4189,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4029,12 +4223,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4073,7 +4267,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -4081,13 +4275,13 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, - billable_metric_id: T.nilable(String), + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: T.nilable(Orb::NewBillingCycleConfiguration), @@ -4124,7 +4318,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4132,38 +4326,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -4171,187 +4365,536 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # Configuration for event_output pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end + sig do + params( + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id + # The name of the price. + sig { returns(String) } + attr_accessor :name - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id + + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id + + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + price_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the price to remove from the plan. + price_id:, + # The phase to remove this price from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order sig do params( @@ -4490,6 +5033,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -4541,6 +5085,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -4605,6 +5150,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -4625,516 +5171,993 @@ module Orb Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) - ) - } + ) + } + ) + end + def to_hash + end + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil ) - end - def to_hash - end - - class LicenseAllocationPrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, - Orb::Internal::AnyHash - ) - end + end - # The cadence to bill for this price on. sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + override.returns( + { + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } ) end - attr_accessor :cadence + def to_hash + end - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The pricing model type - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol - ) - end - attr_accessor :model_type + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) - # The name of the price. - sig { returns(String) } - attr_accessor :name + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash + ) + end - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, + # When True, overage beyond the allocation is written off. + write_off_overage: nil + ) + end - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void + sig do + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } + ) + end + def to_hash + end end - attr_writer :billing_cycle_configuration - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + end - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + sig do + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # The license allocation price to add to the plan. - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash - ], - model_type: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( # The cadence to bill for this price on. - cadence:, + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + sig { returns(String) } + attr_accessor :item_id + # The pricing model type - model_type:, + sig { returns(Symbol) } + attr_accessor :model_type + # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, + sig { returns(String) } + attr_accessor :name + # The id of the billable metric for the price. Only needed if the price is # usage-based. - billable_metric_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - billed_in_advance: nil, + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + # For custom cadence: specifies the duration of the billing period in days or # months. - billing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - currency: nil, + sig { returns(T.nilable(String)) } + attr_accessor :currency + # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. - external_price_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + # If the Price represents a fixed cost, this represents the quantity of units # applied. - fixed_price_quantity: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + # The property used to group this price on an invoice - invoice_grouping_key: nil, + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + # The ID of the license type to associate with this price. - license_type_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - metadata: nil, + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - reference_id: nil - ) - end + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - sig do - override.returns( - { + sig do + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ], - model_type: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) - end - def to_hash - end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + sig do + override.returns( + { + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + attr_accessor :filters - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ] + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: ) - end - def self.values - end - end + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, - Orb::Internal::AnyHash + sig do + override.returns( + { + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end + def to_hash + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Configuration for a single property filter + sig do + params( + property_key: String, + property_value: String + ).returns(T.attached_class) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - UNIT = - T.let( - :unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ) + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ] - ) - end - def self.values + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { + unit_amount: String, + tier_lower_bound: T.nilable(String) + } + ) + end + def to_hash + end + end end - end - end - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The cadence to bill for this price on. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :cadence + attr_reader :matrix_with_threshold_discounts_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -5244,11 +6267,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -5277,12 +6300,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -5323,18 +6346,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :matrix_with_threshold_discounts ) end sig do override.returns( { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -5366,66 +6389,155 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :filters + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension - # Bulk tiers for rating based on total usage volume sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + T.nilable( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) ) end - attr_accessor :tiers + attr_reader :threshold_discount_groups - # Configuration for bulk_with_filters pricing sig do params( - filters: + threshold_discount_groups: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - filters: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -5433,84 +6545,113 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Event property key to filter on sig { returns(String) } - attr_accessor :property_key + attr_accessor :first_dimension_value - # Event property value to match sig { returns(String) } - attr_accessor :property_value + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value - # Configuration for a single property filter sig do params( - property_key: String, - property_value: String + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) ).returns(T.attached_class) end def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: + first_dimension_value:, + unit_amount:, + second_dimension_value: nil ) end sig do override.returns( - { property_key: String, property_value: String } + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end def to_hash end end - class Tier < Orb::Internal::Type::BaseModel + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, Orb::Internal::AnyHash ) end - # Amount per unit + # Discount rate applied to spend above the threshold. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount - # The lower bound for this tier sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound + attr_accessor :description - # Configuration for a single bulk pricing tier sig do params( - unit_amount: String, - tier_lower_bound: T.nilable(String) + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) ).returns(T.attached_class) end def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( { - unit_amount: String, - tier_lower_bound: T.nilable(String) + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) } ) end @@ -5518,61 +6659,6 @@ module Orb end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end class TieredWithProration < Orb::Internal::Type::BaseModel diff --git a/rbi/orb/models/beta_create_plan_version_params.rbi b/rbi/orb/models/beta_create_plan_version_params.rbi index a684dceb4..f5e6de9fe 100644 --- a/rbi/orb/models/beta_create_plan_version_params.rbi +++ b/rbi/orb/models/beta_create_plan_version_params.rbi @@ -321,6 +321,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -371,6 +372,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -432,6 +434,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -904,6 +907,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -1398,11 +1402,11 @@ module Orb end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -1410,7 +1414,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1419,29 +1423,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_reader :tiered_with_proration_config + attr_reader :matrix_with_threshold_discounts_config sig do params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash ).void end - attr_writer :tiered_with_proration_config + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -1544,11 +1548,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1580,10 +1584,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1622,7 +1626,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :matrix_with_threshold_discounts ) end @@ -1630,12 +1634,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1673,7 +1677,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1681,38 +1685,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1720,48 +1724,100 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :tiers + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups - # Configuration for tiered_with_proration pricing sig do params( - tiers: + threshold_discount_groups: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - tiers: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -1769,40 +1825,114 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Inclusive tier starting value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :first_dimension_value - # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # Configuration for a single tiered with proration tier + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { tier_lower_bound: String, unit_amount: String } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash @@ -1811,11 +1941,11 @@ module Orb end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end @@ -1823,27 +1953,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -1856,6 +1970,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1957,11 +2087,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1991,12 +2121,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2035,7 +2165,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :tiered_with_proration ) end @@ -2043,12 +2173,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2086,7 +2216,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2094,38 +2224,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -2133,72 +2263,102 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for tiered_with_proration pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2206,26 +2366,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :grouped_with_min_max_thresholds_config sig do params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2340,9 +2500,9 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2374,8 +2534,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2418,7 +2578,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :grouped_with_min_max_thresholds ) end @@ -2426,9 +2586,9 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, @@ -2469,7 +2629,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2477,38 +2637,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2516,59 +2676,59 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :grouping_key - # The allocation per individual group + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :maximum_charge - # The event property used to group usage before applying allocations + # The minimum amount to charge each group, regardless of usage sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :minimum_charge - # The amount to charge for each unit outside of the allocation + # The base price charged per group sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :per_unit_rate - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The event property used to group before applying thresholds grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2577,11 +2737,11 @@ module Orb end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2589,26 +2749,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :cumulative_grouped_allocation_config sig do params( - daily_credit_allowance_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2723,9 +2883,9 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2757,8 +2917,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2801,7 +2961,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :cumulative_grouped_allocation ) end @@ -2809,9 +2969,9 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -2852,7 +3012,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2860,38 +3020,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2899,144 +3059,72 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :cumulative_allocation - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The allocation per individual group sig { returns(String) } - attr_accessor :default_unit_amount - - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + attr_accessor :group_allocation - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :grouping_key - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] - ).returns(T.attached_class) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end - class MeteredAllowance < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -3044,30 +3132,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :metered_allowance_config + attr_reader :daily_credit_allowance_config sig do params( - metered_allowance_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :metered_allowance_config + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3178,10 +3266,10 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, - metered_allowance_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -3212,10 +3300,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # Configuration for metered_allowance pricing - metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -3256,7 +3344,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :metered_allowance + model_type: :daily_credit_allowance ) end @@ -3264,10 +3352,10 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - metered_allowance_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -3307,7 +3395,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3315,38 +3403,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3354,104 +3442,144 @@ module Orb end end - class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :allowance_grouping_value + attr_accessor :daily_allowance - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :consumption_grouping_value + attr_accessor :default_unit_amount - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # Per-unit price applied to gross consumption and to the allowance credit. + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount - - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - sig { returns(T.nilable(String)) } - attr_reader :allowance_display_name - - sig { params(allowance_display_name: String).void } - attr_writer :allowance_display_name - - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - sig { returns(T.nilable(String)) } - attr_reader :consumption_display_name + attr_accessor :event_day_property - sig { params(consumption_display_name: String).void } - attr_writer :consumption_display_name + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do params( - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. - allowance_grouping_value:, - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. - consumption_grouping_value:, - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - grouping_key:, - # Per-unit price applied to gross consumption and to the allowance credit. - unit_amount:, - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - allowance_display_name: nil, - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - consumption_display_name: nil + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3459,7 +3587,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3468,29 +3596,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3593,11 +3721,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3629,10 +3757,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3671,7 +3799,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3679,12 +3807,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3722,7 +3850,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3730,38 +3858,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3769,38 +3897,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3808,27 +4002,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3841,6 +4019,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3942,11 +4136,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3976,12 +4170,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4020,7 +4214,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -4028,12 +4222,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4071,7 +4265,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4079,38 +4273,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -4118,189 +4312,538 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id + # Configuration for event_output pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + sig do + params( + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - sig do + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id + + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id + + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + params( + price_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the price to remove from the plan. + price_id:, + # The phase to remove this price from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do params( adjustment: T.any( @@ -4437,6 +4980,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -4488,6 +5032,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -4552,6 +5097,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -4572,516 +5118,989 @@ module Orb Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) - ) - } + ) + } + ) + end + def to_hash + end + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil ) - end - def to_hash - end - - class LicenseAllocationPrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, - Orb::Internal::AnyHash - ) - end + end - # The cadence to bill for this price on. sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + override.returns( + { + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } ) end - attr_accessor :cadence + def to_hash + end - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The pricing model type - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol - ) - end - attr_accessor :model_type + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) - # The name of the price. - sig { returns(String) } - attr_accessor :name + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash + ) + end - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, + # When True, overage beyond the allocation is written off. + write_off_overage: nil + ) + end - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void + sig do + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } + ) + end + def to_hash + end end - attr_writer :billing_cycle_configuration - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values + end end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key + end - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + sig do + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # The license allocation price to add to the plan. - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash - ], - model_type: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( # The cadence to bill for this price on. - cadence:, + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + sig { returns(String) } + attr_accessor :item_id + # The pricing model type - model_type:, + sig { returns(Symbol) } + attr_accessor :model_type + # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, + sig { returns(String) } + attr_accessor :name + # The id of the billable metric for the price. Only needed if the price is # usage-based. - billable_metric_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - billed_in_advance: nil, + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + # For custom cadence: specifies the duration of the billing period in days or # months. - billing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - currency: nil, + sig { returns(T.nilable(String)) } + attr_accessor :currency + # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. - external_price_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + # If the Price represents a fixed cost, this represents the quantity of units # applied. - fixed_price_quantity: nil, + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + # The property used to group this price on an invoice - invoice_grouping_key: nil, + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + # The ID of the license type to associate with this price. - license_type_id: nil, + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - metadata: nil, + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - reference_id: nil - ) - end + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - sig do - override.returns( - { + sig do + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation - ], - model_type: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters ) - end - def to_hash - end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + sig do + override.returns( + { + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + attr_accessor :filters - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ) + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol - ] + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: ) - end - def self.values - end - end + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, - Orb::Internal::AnyHash + sig do + override.returns( + { + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end + def to_hash + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Event property value to match + sig { returns(String) } + attr_accessor :property_value - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - UNIT = - T.let( - :unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ) + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol - ] - ) - end - def self.values + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end + end end - end - end - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The cadence to bill for this price on. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :cadence + attr_reader :matrix_with_threshold_discounts_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -5191,11 +6210,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -5224,12 +6243,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -5270,18 +6289,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :matrix_with_threshold_discounts ) end sig do override.returns( { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -5313,66 +6332,155 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :filters + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension - # Bulk tiers for rating based on total usage volume sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + T.nilable( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) ) end - attr_accessor :tiers + attr_reader :threshold_discount_groups - # Configuration for bulk_with_filters pricing sig do params( - filters: + threshold_discount_groups: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - filters: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -5380,142 +6488,120 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Event property key to filter on sig { returns(String) } - attr_accessor :property_key + attr_accessor :first_dimension_value - # Event property value to match sig { returns(String) } - attr_accessor :property_value + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value - # Configuration for a single property filter sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) end def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: + first_dimension_value:, + unit_amount:, + second_dimension_value: nil ) end sig do override.returns( - { property_key: String, property_value: String } + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end def to_hash end end - class Tier < Orb::Internal::Type::BaseModel + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, Orb::Internal::AnyHash ) end - # Amount per unit + # Discount rate applied to spend above the threshold. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount - # The lower bound for this tier sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound + attr_accessor :description - # Configuration for a single bulk pricing tier sig do params( - unit_amount: String, - tier_lower_bound: T.nilable(String) + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) ).returns(T.attached_class) end def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end class TieredWithProration < Orb::Internal::Type::BaseModel diff --git a/rbi/orb/models/changed_subscription_resources.rbi b/rbi/orb/models/changed_subscription_resources.rbi index 1a0d9efb2..806c7eaf7 100644 --- a/rbi/orb/models/changed_subscription_resources.rbi +++ b/rbi/orb/models/changed_subscription_resources.rbi @@ -1408,6 +1408,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/invoice.rbi b/rbi/orb/models/invoice.rbi index 2e5fc5985..eeab24780 100644 --- a/rbi/orb/models/invoice.rbi +++ b/rbi/orb/models/invoice.rbi @@ -1213,6 +1213,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/orb/models/invoice_fetch_upcoming_response.rbi index 0635ae4da..183eba704 100644 --- a/rbi/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/orb/models/invoice_fetch_upcoming_response.rbi @@ -1316,6 +1316,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/invoice_line_item_create_response.rbi b/rbi/orb/models/invoice_line_item_create_response.rbi index 2c8b8d171..d0a7a8a52 100644 --- a/rbi/orb/models/invoice_line_item_create_response.rbi +++ b/rbi/orb/models/invoice_line_item_create_response.rbi @@ -145,6 +145,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/per_price_cost.rbi b/rbi/orb/models/per_price_cost.rbi index e361ee40c..d340c6ada 100644 --- a/rbi/orb/models/per_price_cost.rbi +++ b/rbi/orb/models/per_price_cost.rbi @@ -43,6 +43,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/plan.rbi b/rbi/orb/models/plan.rbi index 27eb4943e..660e0204e 100644 --- a/rbi/orb/models/plan.rbi +++ b/rbi/orb/models/plan.rbi @@ -177,6 +177,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/plan_create_params.rbi b/rbi/orb/models/plan_create_params.rbi index 637045c7f..440aca172 100644 --- a/rbi/orb/models/plan_create_params.rbi +++ b/rbi/orb/models/plan_create_params.rbi @@ -194,6 +194,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::PlanCreateParams::Price::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -244,6 +245,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::OrHash, Orb::PlanCreateParams::Price::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -303,6 +305,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::PlanCreateParams::Price::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -775,6 +778,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::PlanCreateParams::Price::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -1269,6 +1273,545 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/plan_version.rbi b/rbi/orb/models/plan_version.rbi index 2d774f124..55a4e9965 100644 --- a/rbi/orb/models/plan_version.rbi +++ b/rbi/orb/models/plan_version.rbi @@ -57,6 +57,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/price.rbi b/rbi/orb/models/price.rbi index 52544d432..9a4d11c02 100644 --- a/rbi/orb/models/price.rbi +++ b/rbi/orb/models/price.rbi @@ -32,6 +32,7 @@ module Orb Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, + Orb::Price::MatrixWithThresholdDiscounts, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, @@ -9396,6 +9397,911 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol + ) + end + attr_accessor :billing_mode + + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + end + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter + ] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # 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`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) + end + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # 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. + sig do + returns( + T.nilable(Orb::Price::MatrixWithThresholdDiscounts::LicenseType) + ) + end + attr_reader :license_type + + sig do + params( + license_type: + T.nilable( + Orb::Price::MatrixWithThresholdDiscounts::LicenseType::OrHash + ) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::OrSymbol, + cadence: + Orb::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + currency: String, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + matrix_with_threshold_discounts_config: + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::MatrixWithThresholdDiscounts::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable( + Orb::Price::MatrixWithThresholdDiscounts::LicenseType::OrHash + ), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + 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:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + maximum:, + maximum_amount:, + # 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`. + metadata:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # 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. + license_type: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol, + cadence: + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + currency: String, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: + T.nilable(Orb::Price::MatrixWithThresholdDiscounts::LicenseType) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::MatrixWithThresholdDiscounts::BillingMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MatrixWithThresholdDiscounts::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ANNUAL = + T.let( + :annual, + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MatrixWithThresholdDiscounts::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # 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. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_create_params.rbi b/rbi/orb/models/price_create_params.rbi index c707df097..4de000b54 100644 --- a/rbi/orb/models/price_create_params.rbi +++ b/rbi/orb/models/price_create_params.rbi @@ -27,6 +27,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -69,6 +70,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -118,6 +120,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -166,6 +169,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -648,6 +652,533 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_multiple_params.rbi b/rbi/orb/models/price_evaluate_multiple_params.rbi index 11ec798a5..061c48994 100644 --- a/rbi/orb/models/price_evaluate_multiple_params.rbi +++ b/rbi/orb/models/price_evaluate_multiple_params.rbi @@ -137,6 +137,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -189,6 +190,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -259,6 +261,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -308,6 +311,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -790,6 +794,533 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_preview_events_params.rbi b/rbi/orb/models/price_evaluate_preview_events_params.rbi index 9a0f0c862..bdac2080a 100644 --- a/rbi/orb/models/price_evaluate_preview_events_params.rbi +++ b/rbi/orb/models/price_evaluate_preview_events_params.rbi @@ -238,6 +238,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -290,6 +291,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -360,6 +362,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -409,6 +412,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -891,6 +895,533 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_interval.rbi b/rbi/orb/models/price_interval.rbi index b3f747265..e51b65762 100644 --- a/rbi/orb/models/price_interval.rbi +++ b/rbi/orb/models/price_interval.rbi @@ -103,6 +103,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, diff --git a/rbi/orb/models/subscription_create_params.rbi b/rbi/orb/models/subscription_create_params.rbi index 3a5f41d97..83a828bf6 100644 --- a/rbi/orb/models/subscription_create_params.rbi +++ b/rbi/orb/models/subscription_create_params.rbi @@ -602,6 +602,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -664,6 +665,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, Orb::NewSubscriptionUnitWithPercentPrice::OrHash, Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewSubscriptionUnitWithProrationPrice::OrHash, Orb::NewSubscriptionGroupedAllocationPrice::OrHash, @@ -752,6 +754,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -802,6 +805,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -1296,11 +1300,11 @@ module Orb end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -1308,7 +1312,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1317,29 +1321,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_reader :tiered_with_proration_config + attr_reader :matrix_with_threshold_discounts_config sig do params( - tiered_with_proration_config: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash ).void end - attr_writer :tiered_with_proration_config + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -1442,11 +1446,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1478,10 +1482,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1520,7 +1524,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :matrix_with_threshold_discounts ) end @@ -1528,12 +1532,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1571,7 +1575,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1579,38 +1583,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1618,48 +1622,100 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :tiers + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups - # Configuration for tiered_with_proration pricing sig do params( - tiers: + threshold_discount_groups: T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - tiers: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -1667,40 +1723,114 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Inclusive tier starting value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :first_dimension_value - # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # Configuration for a single tiered with proration tier + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { tier_lower_bound: String, unit_amount: String } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash @@ -1709,11 +1839,11 @@ module Orb end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end @@ -1721,27 +1851,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -1754,6 +1868,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1855,11 +1985,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1889,12 +2019,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1933,7 +2063,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :tiered_with_proration ) end @@ -1941,12 +2071,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1984,7 +2114,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1992,38 +2122,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -2031,72 +2161,102 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for tiered_with_proration pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2104,26 +2264,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :grouped_with_min_max_thresholds_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2238,9 +2398,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2272,8 +2432,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2316,7 +2476,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :grouped_with_min_max_thresholds ) end @@ -2324,9 +2484,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, @@ -2367,7 +2527,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2375,38 +2535,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2414,59 +2574,59 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :grouping_key - # The allocation per individual group + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :maximum_charge - # The event property used to group usage before applying allocations + # The minimum amount to charge each group, regardless of usage sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :minimum_charge - # The amount to charge for each unit outside of the allocation + # The base price charged per group sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :per_unit_rate - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The event property used to group before applying thresholds grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2475,11 +2635,11 @@ module Orb end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2487,26 +2647,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :cumulative_grouped_allocation_config sig do params( - daily_credit_allowance_config: - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2621,9 +2781,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2655,8 +2815,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2699,7 +2859,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :cumulative_grouped_allocation ) end @@ -2707,9 +2867,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -2750,7 +2910,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2758,38 +2918,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2797,144 +2957,72 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :cumulative_allocation - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The allocation per individual group sig { returns(String) } - attr_accessor :default_unit_amount - - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + attr_accessor :group_allocation - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :grouping_key - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] - ).returns(T.attached_class) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end - class MeteredAllowance < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2942,30 +3030,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :metered_allowance_config + attr_reader :daily_credit_allowance_config sig do params( - metered_allowance_config: - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :metered_allowance_config + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3076,10 +3164,10 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, - metered_allowance_config: - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -3110,10 +3198,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # Configuration for metered_allowance pricing - metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -3154,7 +3242,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :metered_allowance + model_type: :daily_credit_allowance ) end @@ -3162,10 +3250,10 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - metered_allowance_config: - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -3205,7 +3293,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3213,38 +3301,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3252,104 +3340,144 @@ module Orb end end - class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :allowance_grouping_value + attr_accessor :daily_allowance - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :consumption_grouping_value + attr_accessor :default_unit_amount - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # Per-unit price applied to gross consumption and to the allowance credit. + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount - - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - sig { returns(T.nilable(String)) } - attr_reader :allowance_display_name - - sig { params(allowance_display_name: String).void } - attr_writer :allowance_display_name - - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - sig { returns(T.nilable(String)) } - attr_reader :consumption_display_name + attr_accessor :event_day_property - sig { params(consumption_display_name: String).void } - attr_writer :consumption_display_name + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do params( - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. - allowance_grouping_value:, - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. - consumption_grouping_value:, - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - grouping_key:, - # Per-unit price applied to gross consumption and to the allowance credit. - unit_amount:, - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - allowance_display_name: nil, - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - consumption_display_name: nil + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3357,7 +3485,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3366,29 +3494,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3491,11 +3619,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3527,10 +3655,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3569,7 +3697,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3577,12 +3705,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3620,7 +3748,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3628,38 +3756,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3667,38 +3795,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3706,27 +3900,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3739,6 +3917,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3840,11 +4034,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3874,12 +4068,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3918,7 +4112,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3926,12 +4120,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3969,7 +4163,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3977,38 +4171,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -4016,381 +4210,731 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] - ) - end - def self.variants - end - end - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - module ExternalMarketplace - extend Orb::Internal::Type::Enum + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - GOOGLE = - T.let( - :google, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AWS = - T.let( - :aws, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AZURE = - T.let( - :azure, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) + sig do + params( + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ] - ) - end - def self.values - end - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void end + attr_writer :invoicing_cycle_configuration - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + sig do + params( + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + sig do + override.returns( + { + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] ) + end + def self.variants + end + end + end + + module ExternalMarketplace + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GOOGLE = + T.let( + :google, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AWS = + T.let( + :aws, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AZURE = + T.let( + :azure, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ] ) end - attr_accessor :price + def self.values + end + end - # The id of the price to add to the subscription. + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. sig { returns(T.nilable(String)) } attr_accessor :price_id sig do params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), minimum_amount: T.nilable(String), price: T.nilable( @@ -4409,6 +4953,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, Orb::NewSubscriptionUnitWithPercentPrice::OrHash, Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, Orb::NewSubscriptionUnitWithProrationPrice::OrHash, Orb::NewSubscriptionGroupedAllocationPrice::OrHash, @@ -4490,6 +5035,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -4539,6 +5085,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -4561,42 +5108,514 @@ module Orb ) end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end + end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The cadence to bill for this price on. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :cadence + attr_reader :matrix_with_threshold_discounts_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -4706,11 +5725,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -4739,12 +5758,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -4785,18 +5804,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :matrix_with_threshold_discounts ) end sig do override.returns( { - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -4828,66 +5847,155 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :filters + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension - # Bulk tiers for rating based on total usage volume sig do returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + T.nilable( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) ) end - attr_accessor :tiers + attr_reader :threshold_discount_groups - # Configuration for bulk_with_filters pricing sig do params( - filters: + threshold_discount_groups: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - filters: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -4895,142 +6003,120 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Event property key to filter on sig { returns(String) } - attr_accessor :property_key + attr_accessor :first_dimension_value - # Event property value to match sig { returns(String) } - attr_accessor :property_value + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value - # Configuration for a single property filter sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) end def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: + first_dimension_value:, + unit_amount:, + second_dimension_value: nil ) end sig do override.returns( - { property_key: String, property_value: String } + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end def to_hash end end - class Tier < Orb::Internal::Type::BaseModel + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, Orb::Internal::AnyHash ) end - # Amount per unit + # Discount rate applied to spend above the threshold. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount - # The lower bound for this tier sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound + attr_accessor :description - # Configuration for a single bulk pricing tier sig do params( - unit_amount: String, - tier_lower_bound: T.nilable(String) + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) ).returns(T.attached_class) end def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end class TieredWithProration < Orb::Internal::Type::BaseModel diff --git a/rbi/orb/models/subscription_price_intervals_params.rbi b/rbi/orb/models/subscription_price_intervals_params.rbi index b3b6ab0cd..e20ea87da 100644 --- a/rbi/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/orb/models/subscription_price_intervals_params.rbi @@ -264,6 +264,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -347,6 +348,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -466,6 +468,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -729,6 +732,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -1211,6 +1215,533 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/orb/models/subscription_schedule_plan_change_params.rbi index 02473bde6..05cd0e754 100644 --- a/rbi/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/orb/models/subscription_schedule_plan_change_params.rbi @@ -659,6 +659,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -721,6 +722,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, Orb::NewSubscriptionUnitWithPercentPrice::OrHash, Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewSubscriptionUnitWithProrationPrice::OrHash, Orb::NewSubscriptionGroupedAllocationPrice::OrHash, @@ -809,6 +811,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -859,6 +862,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -1353,11 +1357,11 @@ module Orb end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -1365,7 +1369,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1374,29 +1378,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_reader :tiered_with_proration_config + attr_reader :matrix_with_threshold_discounts_config sig do params( - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash ).void end - attr_writer :tiered_with_proration_config + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -1499,11 +1503,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1535,10 +1539,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1577,7 +1581,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :matrix_with_threshold_discounts ) end @@ -1585,12 +1589,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1628,7 +1632,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1636,38 +1640,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1675,48 +1679,100 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :tiers + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups - # Configuration for tiered_with_proration pricing sig do params( - tiers: + threshold_discount_groups: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - tiers: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -1724,40 +1780,114 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Inclusive tier starting value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :first_dimension_value - # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # Configuration for a single tiered with proration tier + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { tier_lower_bound: String, unit_amount: String } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash @@ -1766,11 +1896,11 @@ module Orb end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end @@ -1778,27 +1908,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -1811,6 +1925,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1912,11 +2042,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1946,12 +2076,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1990,7 +2120,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :tiered_with_proration ) end @@ -1998,12 +2128,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2041,7 +2171,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2049,38 +2179,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -2088,72 +2218,102 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for tiered_with_proration pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2161,26 +2321,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :grouped_with_min_max_thresholds_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2295,9 +2455,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2329,8 +2489,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2373,7 +2533,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :grouped_with_min_max_thresholds ) end @@ -2381,9 +2541,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, @@ -2424,7 +2584,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2432,38 +2592,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2471,59 +2631,59 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :grouping_key - # The allocation per individual group + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :maximum_charge - # The event property used to group usage before applying allocations + # The minimum amount to charge each group, regardless of usage sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :minimum_charge - # The amount to charge for each unit outside of the allocation + # The base price charged per group sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :per_unit_rate - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The event property used to group before applying thresholds grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2532,11 +2692,11 @@ module Orb end end - class DailyCreditAllowance < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2544,26 +2704,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_reader :daily_credit_allowance_config + attr_reader :cumulative_grouped_allocation_config sig do params( - daily_credit_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash ).void end - attr_writer :daily_credit_allowance_config + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2678,9 +2838,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2712,8 +2872,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for daily_credit_allowance pricing - daily_credit_allowance_config:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2756,7 +2916,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :daily_credit_allowance + model_type: :cumulative_grouped_allocation ) end @@ -2764,9 +2924,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, - daily_credit_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, @@ -2807,7 +2967,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2815,38 +2975,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2854,144 +3014,72 @@ module Orb end end - class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Credits granted per day. Lose-it-or-use-it; does not roll over. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :daily_allowance + attr_accessor :cumulative_allocation - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value + # The allocation per individual group sig { returns(String) } - attr_accessor :default_unit_amount - - # One or two event property values to evaluate matrix groups by - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimensions + attr_accessor :group_allocation - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. + # The event property used to group usage before applying allocations sig { returns(String) } - attr_accessor :event_day_property + attr_accessor :grouping_key - # Per-dimension credit rates - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] - ) - end - attr_accessor :matrix_values + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount - # Configuration for daily_credit_allowance pricing + # Configuration for cumulative_grouped_allocation pricing sig do params( - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash - ] - ).returns(T.attached_class) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + ).returns(T.attached_class) end def self.new( - # Credits granted per day. Lose-it-or-use-it; does not roll over. - daily_allowance:, - # Default per-unit credit rate for any usage not bucketed into a specified - # matrix_value - default_unit_amount:, - # One or two event property values to evaluate matrix groups by - dimensions:, - # Event property whose value identifies the day bucket the event belongs to (e.g. - # 'event_day' set to an ISO date string in the customer's timezone). The allowance - # resets per distinct value of this property. - event_day_property:, - # Per-dimension credit rates - matrix_values: + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - daily_allowance: String, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - event_day_property: String, - matrix_values: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class MatrixValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, - Orb::Internal::AnyHash - ) - end - - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - sig { returns(T::Array[T.nilable(String)]) } - attr_accessor :dimension_values - - # Credits charged per unit of usage matching the specified dimension_values - sig { returns(String) } - attr_accessor :unit_amount - - # Per-dimension credit price for the daily credit allowance model. - sig do - params( - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # One or two matrix keys to filter usage to this value by. For example, ["model"] - # could be used to apply a different credit rate to each AI model. - dimension_values:, - # Credits charged per unit of usage matching the specified dimension_values - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_values: T::Array[T.nilable(String)], - unit_amount: String - } - ) - end - def to_hash - end - end end end - class MeteredAllowance < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2999,30 +3087,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :metered_allowance_config + attr_reader :daily_credit_allowance_config sig do params( - metered_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :metered_allowance_config + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3133,10 +3221,10 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, - metered_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -3167,10 +3255,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # Configuration for metered_allowance pricing - metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -3211,7 +3299,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :metered_allowance + model_type: :daily_credit_allowance ) end @@ -3219,10 +3307,10 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - metered_allowance_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -3262,7 +3350,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3270,38 +3358,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3309,104 +3397,144 @@ module Orb end end - class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :allowance_grouping_value + attr_accessor :daily_allowance - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :consumption_grouping_value + attr_accessor :default_unit_amount - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - sig { returns(String) } - attr_accessor :grouping_key + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # Per-unit price applied to gross consumption and to the allowance credit. + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :unit_amount - - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - sig { returns(T.nilable(String)) } - attr_reader :allowance_display_name - - sig { params(allowance_display_name: String).void } - attr_writer :allowance_display_name - - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - sig { returns(T.nilable(String)) } - attr_reader :consumption_display_name + attr_accessor :event_day_property - sig { params(consumption_display_name: String).void } - attr_writer :consumption_display_name + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values - # Configuration for metered_allowance pricing + # Configuration for daily_credit_allowance pricing sig do params( - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The grouping_key value whose summed quantity represents the allowance for this - # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption - # — credit can never exceed actual usage. - allowance_grouping_value:, - # The grouping_key value whose summed quantity represents consumption (e.g. - # 'download'). Charged at unit_amount. - consumption_grouping_value:, - # Event property used to partition the metric into consumption and allowance - # quantities (e.g. 'event_name'). The metric is queried with this key and the two - # values below select which partition is which. - grouping_key:, - # Per-unit price applied to gross consumption and to the allowance credit. - unit_amount:, - # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). - allowance_display_name: nil, - # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). - consumption_display_name: nil + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - allowance_grouping_value: String, - consumption_grouping_value: String, - grouping_key: String, - unit_amount: String, - allowance_display_name: String, - consumption_display_name: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class Percent < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3414,7 +3542,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3423,29 +3551,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :percent_config + attr_reader :metered_allowance_config sig do params( - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - attr_writer :percent_config + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3548,11 +3676,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3584,10 +3712,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3626,7 +3754,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :metered_allowance ) end @@ -3634,12 +3762,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3677,7 +3805,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3685,38 +3813,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3724,38 +3852,104 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3763,27 +3957,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -3796,6 +3974,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3897,11 +4091,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3931,12 +4125,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for percent pricing + percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3975,7 +4169,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :percent ) end @@ -3983,12 +4177,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4026,7 +4220,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4034,38 +4228,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -4073,595 +4267,1420 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end end - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end + class EventOutput < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end - # Reset billing periods to be aligned with the plan change's effective date or - # start of the month. Defaults to `unchanged` which keeps subscription's existing - # billing cycle alignment. - module BillingCycleAlignment - extend Orb::Internal::Type::Enum + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config - UNCHANGED = - T.let( - :unchanged, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - PLAN_CHANGE_DATE = - T.let( - :plan_change_date, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - START_OF_MONTH = - T.let( - :start_of_month, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) + sig do + params( + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ] - ) - end - def self.values - end - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + # The name of the price. + sig { returns(String) } + attr_accessor :name - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end - - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end - - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void end + attr_writer :dimensional_price_configuration - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + sig do + params( + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + sig do + override.returns( + { + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. + module BillingCycleAlignment + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNCHANGED = + T.let( + :unchanged, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + PLAN_CHANGE_DATE = + T.let( + :plan_change_date, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + START_OF_MONTH = + T.let( + :start_of_month, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ] ) end - attr_accessor :price + def self.values + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + external_price_id: T.nilable(String), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::OrHash, + Orb::NewSubscriptionMinimumCompositePrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash + ) + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::OrHash, - Orb::NewSubscriptionMinimumCompositePrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil ) - ), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the subscription. - replaces_price_id:, - # The definition of a new allocation price to create and add to the subscription. - allocation_price: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - discounts: nil, - # The external price id of the price to add to the subscription. - external_price_id: nil, - # The new quantity of the price, if the price is a fixed price. - fixed_price_quantity: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - maximum_amount: nil, - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - metric_parameter_overrides: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - minimum_amount: nil, - # New subscription price request body params. - price: nil, - # The id of the price to add to the subscription. - price_id: nil - ) - end + end - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - discounts: T.nilable(T::Array[Orb::DiscountOverride]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: - T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } ) - ), - price_id: T.nilable(String) - } - ) - end - def to_hash - end + end + def to_hash + end + end + end - # New subscription price request body params. - module Price - extend Orb::Internal::Type::Union + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - Variants = - T.type_alias do - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The cadence to bill for this price on. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :cadence + attr_reader :matrix_with_threshold_discounts_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -4771,11 +5790,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -4804,12 +5823,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -4850,18 +5869,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :matrix_with_threshold_discounts ) end sig do override.returns( { - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -4893,66 +5912,155 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Property filters to apply (all must match) + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :filters + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension - # Bulk tiers for rating based on total usage volume sig do returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + T.nilable( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) ) end - attr_accessor :tiers + attr_reader :threshold_discount_groups - # Configuration for bulk_with_filters pricing sig do params( - filters: + threshold_discount_groups: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - filters: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ], - tiers: + second_dimension: T.nilable(String), + threshold_discount_groups: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -4960,142 +6068,120 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Event property key to filter on sig { returns(String) } - attr_accessor :property_key + attr_accessor :first_dimension_value - # Event property value to match sig { returns(String) } - attr_accessor :property_value + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value - # Configuration for a single property filter sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) end def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: + first_dimension_value:, + unit_amount:, + second_dimension_value: nil ) end sig do override.returns( - { property_key: String, property_value: String } + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end def to_hash end end - class Tier < Orb::Internal::Type::BaseModel + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, Orb::Internal::AnyHash ) end - # Amount per unit + # Discount rate applied to spend above the threshold. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount - # The lower bound for this tier sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound + attr_accessor :description - # Configuration for a single bulk pricing tier sig do params( - unit_amount: String, - tier_lower_bound: T.nilable(String) + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) ).returns(T.attached_class) end def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash end end end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end end class TieredWithProration < Orb::Internal::Type::BaseModel diff --git a/rbi/orb/resources/customers/credits/ledger.rbi b/rbi/orb/resources/customers/credits/ledger.rbi index d71f50da5..442bfb81b 100644 --- a/rbi/orb/resources/customers/credits/ledger.rbi +++ b/rbi/orb/resources/customers/credits/ledger.rbi @@ -194,11 +194,17 @@ module Orb # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # @@ -330,11 +336,17 @@ module Orb # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # diff --git a/rbi/orb/resources/prices.rbi b/rbi/orb/resources/prices.rbi index ab8af31af..e43262a34 100644 --- a/rbi/orb/resources/prices.rbi +++ b/rbi/orb/resources/prices.rbi @@ -54,6 +54,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, diff --git a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs index f1a50f660..5edaee859 100644 --- a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +++ b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs @@ -310,6 +310,7 @@ module Orb | Orb::NewPlanPackageWithAllocationPrice | Orb::NewPlanUnitWithPercentPrice | Orb::NewPlanMatrixWithAllocationPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration | Orb::NewPlanUnitWithProrationPrice | Orb::NewPlanGroupedAllocationPrice @@ -519,6 +520,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, @@ -1945,6 +2179,7 @@ module Orb | Orb::NewPlanPackageWithAllocationPrice | Orb::NewPlanUnitWithPercentPrice | Orb::NewPlanMatrixWithAllocationPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration | Orb::NewPlanUnitWithProrationPrice | Orb::NewPlanGroupedAllocationPrice @@ -2154,6 +2389,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, diff --git a/sig/orb/models/beta_create_plan_version_params.rbs b/sig/orb/models/beta_create_plan_version_params.rbs index 23a67f07e..534032570 100644 --- a/sig/orb/models/beta_create_plan_version_params.rbs +++ b/sig/orb/models/beta_create_plan_version_params.rbs @@ -304,6 +304,7 @@ module Orb | Orb::NewPlanPackageWithAllocationPrice | Orb::NewPlanUnitWithPercentPrice | Orb::NewPlanMatrixWithAllocationPrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts | Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration | Orb::NewPlanUnitWithProrationPrice | Orb::NewPlanGroupedAllocationPrice @@ -510,6 +511,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, @@ -1928,6 +2162,7 @@ module Orb | Orb::NewPlanPackageWithAllocationPrice | Orb::NewPlanUnitWithPercentPrice | Orb::NewPlanMatrixWithAllocationPrice + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration | Orb::NewPlanUnitWithProrationPrice | Orb::NewPlanGroupedAllocationPrice @@ -2134,6 +2369,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index 5da1a7858..5f2d1865e 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -283,6 +283,7 @@ module Orb | Orb::NewPlanPackageWithAllocationPrice | Orb::NewPlanUnitWithPercentPrice | Orb::NewPlanMatrixWithAllocationPrice + | Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts | Orb::PlanCreateParams::Price::Price::TieredWithProration | Orb::NewPlanUnitWithProrationPrice | Orb::NewPlanGroupedAllocationPrice @@ -489,6 +490,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, diff --git a/sig/orb/models/price.rbs b/sig/orb/models/price.rbs index 6be550a3f..41a1bab60 100644 --- a/sig/orb/models/price.rbs +++ b/sig/orb/models/price.rbs @@ -15,6 +15,7 @@ module Orb | Orb::Price::PackageWithAllocation | Orb::Price::UnitWithPercent | Orb::Price::MatrixWithAllocation + | Orb::Price::MatrixWithThresholdDiscounts | Orb::Price::TieredWithProration | Orb::Price::UnitWithProration | Orb::Price::GroupedAllocation @@ -4145,6 +4146,383 @@ module Orb end end + type matrix_with_threshold_discounts = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode, + cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :matrix_with_threshold_discounts, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode + + attr_accessor cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode, + cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type, + replaces_price_id: String?, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode, + cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :matrix_with_threshold_discounts, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator] + end + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::price_type] + end + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + type tiered_with_proration = { id: String, diff --git a/sig/orb/models/price_create_params.rbs b/sig/orb/models/price_create_params.rbs index 28bd11e53..4da529a7b 100644 --- a/sig/orb/models/price_create_params.rbs +++ b/sig/orb/models/price_create_params.rbs @@ -35,6 +35,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -228,6 +229,229 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::cadence, diff --git a/sig/orb/models/price_evaluate_multiple_params.rbs b/sig/orb/models/price_evaluate_multiple_params.rbs index 356274c78..52c2ae32a 100644 --- a/sig/orb/models/price_evaluate_multiple_params.rbs +++ b/sig/orb/models/price_evaluate_multiple_params.rbs @@ -104,6 +104,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -305,6 +306,234 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::cadence, diff --git a/sig/orb/models/price_evaluate_preview_events_params.rbs b/sig/orb/models/price_evaluate_preview_events_params.rbs index ac7842b23..2ec5edc7a 100644 --- a/sig/orb/models/price_evaluate_preview_events_params.rbs +++ b/sig/orb/models/price_evaluate_preview_events_params.rbs @@ -150,6 +150,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -351,6 +352,234 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::cadence, diff --git a/sig/orb/models/subscription_create_params.rbs b/sig/orb/models/subscription_create_params.rbs index 04cbc195e..6a2c57406 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -310,6 +310,7 @@ module Orb | Orb::NewSubscriptionPackageWithAllocationPrice | Orb::NewSubscriptionUnitWithPercentPrice | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts | Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration | Orb::NewSubscriptionUnitWithProrationPrice | Orb::NewSubscriptionGroupedAllocationPrice @@ -516,6 +517,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::cadence, @@ -1802,6 +2036,7 @@ module Orb | Orb::NewSubscriptionPackageWithAllocationPrice | Orb::NewSubscriptionUnitWithPercentPrice | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts | Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration | Orb::NewSubscriptionUnitWithProrationPrice | Orb::NewSubscriptionGroupedAllocationPrice @@ -2008,6 +2243,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, diff --git a/sig/orb/models/subscription_price_intervals_params.rbs b/sig/orb/models/subscription_price_intervals_params.rbs index faba710d3..f9dcf6302 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -253,6 +253,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -454,6 +455,234 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::cadence, diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index 70b16e6dd..01cdf4476 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -291,6 +291,7 @@ module Orb | Orb::NewSubscriptionPackageWithAllocationPrice | Orb::NewSubscriptionUnitWithPercentPrice | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration | Orb::NewSubscriptionUnitWithProrationPrice | Orb::NewSubscriptionGroupedAllocationPrice @@ -497,6 +498,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::cadence, @@ -1784,6 +2018,7 @@ module Orb | Orb::NewSubscriptionPackageWithAllocationPrice | Orb::NewSubscriptionUnitWithPercentPrice | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration | Orb::NewSubscriptionUnitWithProrationPrice | Orb::NewSubscriptionGroupedAllocationPrice @@ -1990,6 +2225,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, diff --git a/test/orb/resources/prices/external_price_id_test.rb b/test/orb/resources/prices/external_price_id_test.rb index 941f8d6fe..b1ff49259 100644 --- a/test/orb/resources/prices/external_price_id_test.rb +++ b/test/orb/resources/prices/external_price_id_test.rb @@ -26,6 +26,7 @@ def test_update in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -498,6 +499,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -1133,6 +1166,7 @@ def test_fetch in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -1605,6 +1639,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, diff --git a/test/orb/resources/prices_test.rb b/test/orb/resources/prices_test.rb index 77aea2042..ba8d7abf4 100644 --- a/test/orb/resources/prices_test.rb +++ b/test/orb/resources/prices_test.rb @@ -36,6 +36,7 @@ def test_create_required_params in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -508,6 +509,38 @@ def test_create_required_params dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -1143,6 +1176,7 @@ def test_update in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -1615,6 +1649,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -2257,6 +2323,7 @@ def test_list in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -2729,6 +2796,38 @@ def test_list dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -3419,6 +3518,7 @@ def test_fetch in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -3891,6 +3991,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, From 23d32011db988a4981936948d8f948e137c1ff79 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 23:16:15 +0000 Subject: [PATCH 22/22] release: 1.15.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/orb/version.rb | 2 +- 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e72f11310..7ccfe12c9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.0" + ".": "1.15.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d804c260..6da249b5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## 1.15.0 (2026-05-22) + +Full Changelog: [v1.14.0...v1.15.0](https://github.com/orbcorp/orb-ruby/compare/v1.14.0...v1.15.0) + +### Features + +* **api:** api update ([0738a02](https://github.com/orbcorp/orb-ruby/commit/0738a025b24db964db277bb3db1f6726308b1982)) +* **api:** api update ([b4e2776](https://github.com/orbcorp/orb-ruby/commit/b4e2776acd7d8f16e4638ffae48252fe359965b6)) +* **api:** api update ([4fa4367](https://github.com/orbcorp/orb-ruby/commit/4fa43675278ba33b0a666c2cc89ee1a3d1db756f)) +* **api:** api update ([6f796af](https://github.com/orbcorp/orb-ruby/commit/6f796af8274ac07b0212a71aa7f4514b202e094b)) +* **api:** api update ([5f0254d](https://github.com/orbcorp/orb-ruby/commit/5f0254dff5af51dd7a0b1302adc3a7c8db209011)) +* **api:** api update ([ebd342e](https://github.com/orbcorp/orb-ruby/commit/ebd342e9f511341c93ab4e57f7b92420d0677aa2)) +* **api:** api update ([2a2a137](https://github.com/orbcorp/orb-ruby/commit/2a2a137ad0d25853629c6de454472078d10a7cb3)) +* **api:** api update ([57f4509](https://github.com/orbcorp/orb-ruby/commit/57f4509e2c1e6e25913e713a33246805b8ae6474)) +* **api:** api update ([745a900](https://github.com/orbcorp/orb-ruby/commit/745a900f984941c1c00951c020a74007639e18da)) +* **api:** api update ([bd3d312](https://github.com/orbcorp/orb-ruby/commit/bd3d31208c279ea4d20a796494d307cad588f984)) +* **api:** api update ([abb683a](https://github.com/orbcorp/orb-ruby/commit/abb683ad449e5f3c44d72e829ed8df261d5a8e62)) +* **api:** api update ([bc1c5ce](https://github.com/orbcorp/orb-ruby/commit/bc1c5ceda19f8f2ee9a9459b9ac07f5cb1412b8b)) +* **api:** api update ([160ea66](https://github.com/orbcorp/orb-ruby/commit/160ea66268e7608fec8a56defecb8629538e0291)) +* support setting headers via env ([98a1cef](https://github.com/orbcorp/orb-ruby/commit/98a1cef742a7169b8b481020369e2dcd1f4c3493)) + + +### Bug Fixes + +* **client:** elide content type header on requests without body ([8c2ddbb](https://github.com/orbcorp/orb-ruby/commit/8c2ddbb632b0fa247e4819c27d7f4e5078e90bff)) + + +### Chores + +* **internal:** more robust bootstrap script ([2430669](https://github.com/orbcorp/orb-ruby/commit/2430669ed45de80ddfc9f6bada96725a6de44463)) +* **tests:** bump steady to v0.22.1 ([70eb623](https://github.com/orbcorp/orb-ruby/commit/70eb623e0694da153355a061b4bc059f3023f063)) + ## 1.14.0 (2026-04-13) Full Changelog: [v1.13.0...v1.14.0](https://github.com/orbcorp/orb-ruby/compare/v1.13.0...v1.14.0) diff --git a/Gemfile.lock b/Gemfile.lock index ef39b9013..e4bdecc3b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - orb-billing (1.14.0) + orb-billing (1.15.0) cgi connection_pool diff --git a/README.md b/README.md index e7212529c..dc5c39c22 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "orb-billing", "~> 1.14.0" +gem "orb-billing", "~> 1.15.0" ``` diff --git a/lib/orb/version.rb b/lib/orb/version.rb index b43d5ca28..9d1f4bdcf 100644 --- a/lib/orb/version.rb +++ b/lib/orb/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Orb - VERSION = "1.14.0" + VERSION = "1.15.0" end